Eric V. Smith <e...@trueblade.com> added the comment:

The problem is that dataclasses is looking for a default value for a field by 
looking at getattr(cls, fieldname), which returns a value when fieldname is 
"mro".

I think the best thing to do, at least for now, is prohibit a field named "mro".

Ultimately I'd like to see cls.mro go away (maybe being replaced by a builtin), 
but I realize that's not likely to happen.

----------

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

Reply via email to