Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Lib/rlcompleter.py

    r2 r388  
    1 """Word completion for GNU readline 2.0.
     1"""Word completion for GNU readline.
    22
    3 This requires the latest extension to the readline module. The completer
    4 completes keywords, built-ins and globals in a selectable namespace (which
    5 defaults to __main__); when completing NAME.NAME..., it evaluates (!) the
    6 expression up to the last dot and completes its attributes.
     3The completer completes keywords, built-ins and globals in a selectable
     4namespace (which defaults to __main__); when completing NAME.NAME..., it
     5evaluates (!) the expression up to the last dot and completes its attributes.
    76
    8 It's very cool to do "import sys" type "sys.", hit the
    9 completion key (twice), and see the list of names defined by the
    10 sys module!
     7It's very cool to do "import sys" type "sys.", hit the completion key (twice),
     8and see the list of names defined by the sys module!
    119
    1210Tip: to use the tab key as the completion key, call
     
    1614Notes:
    1715
    18 - Exceptions raised by the completer function are *ignored* (and
    19 generally cause the completion to fail).  This is a feature -- since
    20 readline sets the tty device in raw (or cbreak) mode, printing a
    21 traceback wouldn't work well without some complicated hoopla to save,
    22 reset and restore the tty state.
     16- Exceptions raised by the completer function are *ignored* (and generally cause
     17  the completion to fail).  This is a feature -- since readline sets the tty
     18  device in raw (or cbreak) mode, printing a traceback wouldn't work well
     19  without some complicated hoopla to save, reset and restore the tty state.
    2320
    24 - The evaluation of the NAME.NAME... form may cause arbitrary
    25 application defined code to be executed if an object with a
    26 __getattr__ hook is found.  Since it is the responsibility of the
    27 application (or the user) to enable this feature, I consider this an
    28 acceptable risk.  More complicated expressions (e.g. function calls or
    29 indexing operations) are *not* evaluated.
     21- The evaluation of the NAME.NAME... form may cause arbitrary application
     22  defined code to be executed if an object with a __getattr__ hook is found.
     23  Since it is the responsibility of the application (or the user) to enable this
     24  feature, I consider this an acceptable risk.  More complicated expressions
     25  (e.g. function calls or indexing operations) are *not* evaluated.
    3026
    3127- GNU readline is also used by the built-in functions input() and
     
    3632
    3733- When the original stdin is not a tty device, GNU readline is never
    38 used, and this module (and the readline module) are silently inactive.
     34  used, and this module (and the readline module) are silently inactive.
    3935
    4036"""
     
    121117
    122118        Assuming the text is of the form NAME.NAME....[NAME], and is
    123         evaluatable in self.namespace, it will be evaluated and its attributes
     119        evaluable in self.namespace, it will be evaluated and its attributes
    124120        (as revealed by dir()) are used as possible completions.  (For class
    125121        instances, class members are also considered.)
Note: See TracChangeset for help on using the changeset viewer.