[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

Ivan Levkivskyi report at bugs.python.org
Tue Jun 11 07:30:16 EDT 2019


Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:

I think we can proceed with option A, but only if doesn't cause visible slow-down for creating ABCs (which is already slower that normal classes). TBH, I don't want to document A as "official" recipe (maybe however mention the problem in the `pickle` module docs).

Note that other "class factories" in stdlib (like collections.namedtuple) do almost exactly option A.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28869>
_______________________________________


More information about the Python-bugs-list mailing list