|
24 | 24 | Notes: |
25 | 25 |
|
26 | 26 | - Exceptions raised by the completer function are *ignored* (and |
27 | | -generally cause the completion to fail). This is a feature -- since |
28 | | -readline sets the tty device in raw (or cbreak) mode, printing a |
29 | | -traceback wouldn't work well without some complicated hoopla to save, |
30 | | -reset and restore the tty state. |
| 27 | + generally cause the completion to fail). This is a feature -- since |
| 28 | + readline sets the tty device in raw (or cbreak) mode, printing a |
| 29 | + traceback wouldn't work well without some complicated hoopla to save, |
| 30 | + reset and restore the tty state. |
31 | 31 |
|
32 | 32 | - The evaluation of the NAME.NAME... form may cause arbitrary |
33 | | -application defined code to be executed if an object with a |
34 | | -__getattr__ hook is found. Since it is the responsibility of the |
35 | | -application (or the user) to enable this feature, I consider this an |
36 | | -acceptable risk. More complicated expressions (e.g. function calls or |
37 | | -indexing operations) are *not* evaluated. |
| 33 | + application defined code to be executed if an object with a |
| 34 | + ``__getattr__`` hook is found. Since it is the responsibility of the |
| 35 | + application (or the user) to enable this feature, I consider this an |
| 36 | + acceptable risk. More complicated expressions (e.g. function calls or |
| 37 | + indexing operations) are *not* evaluated. |
38 | 38 |
|
39 | 39 | - GNU readline is also used by the built-in functions input() and |
40 | | -raw_input(), and thus these also benefit/suffer from the completer |
41 | | -features. Clearly an interactive application can benefit by |
42 | | -specifying its own completer function and using raw_input() for all |
43 | | -its input. |
| 40 | + raw_input(), and thus these also benefit/suffer from the completer |
| 41 | + features. Clearly an interactive application can benefit by |
| 42 | + specifying its own completer function and using raw_input() for all |
| 43 | + its input. |
44 | 44 |
|
45 | 45 | - When the original stdin is not a tty device, GNU readline is never |
46 | | -used, and this module (and the readline module) are silently inactive. |
| 46 | + used, and this module (and the readline module) are silently inactive. |
47 | 47 | """ |
48 | 48 |
|
49 | 49 | #***************************************************************************** |
@@ -441,17 +441,17 @@ def __init__(self, shell=None, namespace=None, global_namespace=None, |
441 | 441 | Inputs: |
442 | 442 |
|
443 | 443 | - shell: a pointer to the ipython shell itself. This is needed |
444 | | - because this completer knows about magic functions, and those can |
445 | | - only be accessed via the ipython instance. |
| 444 | + because this completer knows about magic functions, and those can |
| 445 | + only be accessed via the ipython instance. |
446 | 446 |
|
447 | 447 | - namespace: an optional dict where completions are performed. |
448 | 448 |
|
449 | 449 | - global_namespace: secondary optional dict for completions, to |
450 | | - handle cases (such as IPython embedded inside functions) where |
451 | | - both Python scopes are visible. |
| 450 | + handle cases (such as IPython embedded inside functions) where |
| 451 | + both Python scopes are visible. |
452 | 452 |
|
453 | 453 | - If alias_table is supplied, it should be a dictionary of aliases |
454 | | - to complete. |
| 454 | + to complete. |
455 | 455 |
|
456 | 456 | use_readline : bool, optional |
457 | 457 | If true, use the readline library. This completer can still function |
|
0 commit comments