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

I think the only other thing that could be done is to have a special test for 
"default is type.mro", and if so, don't assume it's a default value. Which 
means that you could never actually use:

@dataclass
class A:
   mro: object = type.mro

But it's probably best to just disallow a field named "mro". Which is 
unfortunate, but such is life. It's a shame mro isn't a builtin, so we could do 
mro(A) instead of A.mro().

----------

_______________________________________
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