Show More
@@ -30,6 +30,9 b'' | |||||
30 | """ |
|
30 | """ | |
31 | Decorator module, see http://pypi.python.org/pypi/decorator |
|
31 | Decorator module, see http://pypi.python.org/pypi/decorator | |
32 | for the documentation. |
|
32 | for the documentation. | |
|
33 | ||||
|
34 | NOTE: this is an IPython-patched version to work on IronPython. See | |||
|
35 | FIXED comment below. | |||
33 | """ |
|
36 | """ | |
34 | from __future__ import print_function |
|
37 | from __future__ import print_function | |
35 |
|
38 | |||
@@ -139,6 +142,8 b' class FunctionMaker(object):' | |||||
139 | func.__defaults__ = getattr(self, 'defaults', ()) |
|
142 | func.__defaults__ = getattr(self, 'defaults', ()) | |
140 | func.__kwdefaults__ = getattr(self, 'kwonlydefaults', None) |
|
143 | func.__kwdefaults__ = getattr(self, 'kwonlydefaults', None) | |
141 | func.__annotations__ = getattr(self, 'annotations', None) |
|
144 | func.__annotations__ = getattr(self, 'annotations', None) | |
|
145 | # FIXED: The following is try/execpted in IPython to work | |||
|
146 | # with IronPython. | |||
142 | try: |
|
147 | try: | |
143 | callermodule = sys._getframe(3).f_globals.get('__name__', '?') |
|
148 | callermodule = sys._getframe(3).f_globals.get('__name__', '?') | |
144 | except AttributeError: # IronPython _getframe only exists with FullFrames |
|
149 | except AttributeError: # IronPython _getframe only exists with FullFrames |
General Comments 0
You need to be logged in to leave comments.
Login now