Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

The origin of the error was an incorrect update from Python 2 semantics where 
the class was exposed as an attribute:

Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:24:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> class A:
        def f(self, x):
                return x
        
>>> a = A()
>>> bm = a.f
>>> bm.im_class
<class __main__.A at 0x1002daf30>
>>> bm.im_self
<__main__.A instance at 0x103a204b0>
>>> bm.im_func
<function f at 0x1004ed950>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to