Show More
@@ -131,6 +131,10 b' if sys.version_info[0] >= 3:' | |||
|
131 | 131 | |
|
132 | 132 | Accepts a string or a function, so it can be used as a decorator.""" |
|
133 | 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 | 139 | else: |
|
136 | 140 | PY3 = False |
@@ -192,6 +196,9 b' else:' | |||
|
192 | 196 | def doctest_refactor_print(func_or_str): |
|
193 | 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 | 203 | # Abstract u'abc' syntax: |
|
197 | 204 | @_modify_str_or_docstring |
General Comments 0
You need to be logged in to leave comments.
Login now