@method: Fix it for Python3
There was no test for @method so far and that's why it went unnoticed. But on Python3 it breaks on f.func_name: In [3]: def f(): pass In [4]: f.func_name --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-4-662dcbac1531> in <module>() ----> 1 f.func_name AttributeError: 'function' object has no attribute 'func_name' Fix it by using f.__name__ which works on both py2 and py3. Add test for @method to make sure it doesn't break unnoticed.
Showing
Please register or sign in to comment