Show More
@@ -260,12 +260,9 b' class ModuleReloader(object):' | |||
|
260 | 260 | # superreload |
|
261 | 261 | #------------------------------------------------------------------------------ |
|
262 | 262 | |
|
263 | if PY3: | |
|
264 |
|
|
|
265 |
|
|
|
266 | else: | |
|
267 | func_attrs = ['func_code', 'func_defaults', 'func_doc', | |
|
268 | 'func_closure', 'func_globals', 'func_dict'] | |
|
263 | ||
|
264 | func_attrs = ['__code__', '__defaults__', '__doc__', | |
|
265 | '__closure__', '__globals__', '__dict__'] | |
|
269 | 266 | |
|
270 | 267 | |
|
271 | 268 | def update_function(old, new): |
@@ -320,18 +317,9 b' UPDATE_RULES = [' | |||
|
320 | 317 | (lambda a, b: isinstance2(a, b, property), |
|
321 | 318 | update_property), |
|
322 | 319 | ] |
|
323 | ||
|
324 | ||
|
325 | if PY3: | |
|
326 | UPDATE_RULES.extend([(lambda a, b: isinstance2(a, b, types.MethodType), | |
|
327 | lambda a, b: update_function(a.__func__, b.__func__)), | |
|
328 | ]) | |
|
329 | else: | |
|
330 | UPDATE_RULES.extend([(lambda a, b: isinstance2(a, b, types.ClassType), | |
|
331 | update_class), | |
|
332 | (lambda a, b: isinstance2(a, b, types.MethodType), | |
|
333 | lambda a, b: update_function(a.__func__, b.__func__)), | |
|
334 | ]) | |
|
320 | UPDATE_RULES.extend([(lambda a, b: isinstance2(a, b, types.MethodType), | |
|
321 | lambda a, b: update_function(a.__func__, b.__func__)), | |
|
322 | ]) | |
|
335 | 323 | |
|
336 | 324 | |
|
337 | 325 | def update_generic(a, b): |
General Comments 0
You need to be logged in to leave comments.
Login now