Show More
@@ -40,7 +40,7 b' import time' | |||||
40 | # Constants |
|
40 | # Constants | |
41 | #----------------------------------------------------------------------------- |
|
41 | #----------------------------------------------------------------------------- | |
42 |
|
42 | |||
43 |
# Rough |
|
43 | # Roughly equal to PyCF_MASK | PyCF_MASK_OBSOLETE as defined in pythonrun.h, | |
44 | # this is used as a bitmask to extract future-related code flags. |
|
44 | # this is used as a bitmask to extract future-related code flags. | |
45 | PyCF_MASK = functools.reduce(operator.or_, |
|
45 | PyCF_MASK = functools.reduce(operator.or_, | |
46 | (getattr(__future__, fname).compiler_flag |
|
46 | (getattr(__future__, fname).compiler_flag |
@@ -174,7 +174,7 b' class CommandChainDispatcher:' | |||||
174 | def shutdown_hook(self): |
|
174 | def shutdown_hook(self): | |
175 | """ default shutdown hook |
|
175 | """ default shutdown hook | |
176 |
|
176 | |||
177 |
Typically, sh |
|
177 | Typically, shutdown hooks should raise TryNext so all shutdown ops are done | |
178 | """ |
|
178 | """ | |
179 |
|
179 | |||
180 | #print "default shutdown hook ok" # dbg |
|
180 | #print "default shutdown hook ok" # dbg |
@@ -82,7 +82,7 b' class PrefilterManager(Configurable):' | |||||
82 | prefilter consumes lines of input and produces transformed lines of |
|
82 | prefilter consumes lines of input and produces transformed lines of | |
83 | input. |
|
83 | input. | |
84 |
|
84 | |||
85 | The iplementation consists of two phases: |
|
85 | The implementation consists of two phases: | |
86 |
|
86 | |||
87 | 1. Transformers |
|
87 | 1. Transformers | |
88 | 2. Checkers and handlers |
|
88 | 2. Checkers and handlers |
@@ -765,7 +765,7 b' if _env_type is not dict:' | |||||
765 |
|
765 | |||
766 | try: |
|
766 | try: | |
767 | # In PyPy, types.DictProxyType is dict, setting the dictproxy printer |
|
767 | # In PyPy, types.DictProxyType is dict, setting the dictproxy printer | |
768 |
# using dict.setdefault avoids overwrit |
|
768 | # using dict.setdefault avoids overwriting the dict printer | |
769 | _type_pprinters.setdefault(types.DictProxyType, |
|
769 | _type_pprinters.setdefault(types.DictProxyType, | |
770 | _dict_pprinter_factory('dict_proxy({', '})')) |
|
770 | _dict_pprinter_factory('dict_proxy({', '})')) | |
771 | _type_pprinters[types.ClassType] = _type_pprint |
|
771 | _type_pprinters[types.ClassType] = _type_pprint |
@@ -21,7 +21,7 b' def doctest_run():' | |||||
21 | """ |
|
21 | """ | |
22 |
|
22 | |||
23 | def doctest_runvars(): |
|
23 | def doctest_runvars(): | |
24 | """Test that variables defined in scripts get loaded correcly via %run. |
|
24 | """Test that variables defined in scripts get loaded correclty via %run. | |
25 |
|
25 | |||
26 | In [13]: run simplevars.py |
|
26 | In [13]: run simplevars.py | |
27 | x is: 1 |
|
27 | x is: 1 |
@@ -58,7 +58,7 b' def extract_vars_above(*names):' | |||||
58 | """Extract a set of variables by name from another frame. |
|
58 | """Extract a set of variables by name from another frame. | |
59 |
|
59 | |||
60 | Similar to extractVars(), but with a specified depth of 1, so that names |
|
60 | Similar to extractVars(), but with a specified depth of 1, so that names | |
61 |
are ex |
|
61 | are extracted exactly from above the caller. | |
62 |
|
62 | |||
63 | This is simply a convenience function so that the very common case (for us) |
|
63 | This is simply a convenience function so that the very common case (for us) | |
64 | of skipping exactly 1 frame doesn't have to construct a special dict for |
|
64 | of skipping exactly 1 frame doesn't have to construct a special dict for | |
@@ -93,4 +93,3 b' def extract_module_locals(depth=0):' | |||||
93 | global_ns = f.f_globals |
|
93 | global_ns = f.f_globals | |
94 | module = sys.modules[global_ns['__name__']] |
|
94 | module = sys.modules[global_ns['__name__']] | |
95 | return (module, f.f_locals) |
|
95 | return (module, f.f_locals) | |
96 |
|
General Comments 0
You need to be logged in to leave comments.
Login now