##// END OF EJS Templates
add py3compat.get_closure...
MinRK -
Show More
@@ -131,6 +131,10 b' if sys.version_info[0] >= 3:'
131
131
132 Accepts a string or a function, so it can be used as a decorator."""
132 Accepts a string or a function, so it can be used as a decorator."""
133 return s.format(u='')
133 return s.format(u='')
134
135 def get_closure(f):
136 """Get a function's closure attribute"""
137 return f.__closure__
134
138
135 else:
139 else:
136 PY3 = False
140 PY3 = False
@@ -192,6 +196,9 b' else:'
192 def doctest_refactor_print(func_or_str):
196 def doctest_refactor_print(func_or_str):
193 return func_or_str
197 return func_or_str
194
198
199 def get_closure(f):
200 """Get a function's closure attribute"""
201 return f.func_closure
195
202
196 # Abstract u'abc' syntax:
203 # Abstract u'abc' syntax:
197 @_modify_str_or_docstring
204 @_modify_str_or_docstring
General Comments 0
You need to be logged in to leave comments. Login now