Ivan Levkivskyi added the comment:
> As a matter of fact, A.__module__ in this case is abc.ABCMeta.__module__. A
> class body creates a __module__ key, while a direct metaclass call does not.
But
>>> A = ABCMeta('A', (), {})
>>> ABCMeta.__module__ = 'hi'
>>> A.__module__
'abc'
>>> ABCMeta.__module__
'hi'
This means that the __module__ is copied from metaclass (also A.__dict__
actually contains '__module__' key, checked in 3.6).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28869>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com