• Raymond Hettinger's avatar
    Backport 2.49: · 8c354ac5
    Raymond Hettinger yazdı
    SF #558432: Prevent Annoying ' ' from readline (Holker Krekel).
    
        readline in all python versions is configured
        to append a 'space' character for a successful
        completion. But for almost all python expressions
        'space' is not wanted (see coding conventions PEP 8).
        For example if you have a function 'longfunction'
        and you type 'longf<TAB>' you get 'longfunction '
        as a completion. note the unwanted space at the
        end.
    
        The patch fixes this behaviour by setting readline's
        append_character to '\0' which means don't append
        anything. This doesn't work with readline < 2.1
        (AFAIK nowadays readline2.2 is in good use).
    
        An alternative approach would be to make the
        append_character
        accessable from python so that modules like
        the rlcompleter.py can set it to '\0'.
    
    [Ed.: I think expecting readline >= 2.2 is fine.  If a completer wants
    another character they can append that to the keyword in the list.]
    8c354ac5
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
PLAN.txt Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...