提交 d7067283 authored 作者: Frederic's avatar Frederic

Fix debugmode checking in python3

上级 0749674e
...@@ -244,6 +244,11 @@ except NameError: ...@@ -244,6 +244,11 @@ except NameError:
if PY3: if PY3:
def get_unbound_function(unbound): def get_unbound_function(unbound):
# Op.make_thunk isn't bound, so don't have a __func__ attr.
# But bound method, have a __func__ method that point to the
# not bound method. That is what we want.
if hasattr(unbound, '__func__'):
return unbound.__func__
return unbound return unbound
Iterator = object Iterator = object
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论