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

The discussion on python-dev was that your ??? box would be "no": if the user 
supplied __repr__, they obviously meant for dataclass() to not provide one.

I can't see why the user would say repr=True ("I want dataclass() to add 
__repr__"), but then provide a __repr__ and get an exception. That looks like 
the only functionality added by your repr=True row over the proposal. Where 
your proposal uses repr=None for the "no", "yes" row, mine uses repr=True.

It's not like there's action at a distance here: the user is writing the class. 
Especially since base classes are ignored. 

I'm ignoring make_dataclasses(), where the user is dynamically creating a class 
and maybe a __repr__ snuck in. But I don't care so much about that case.

I do think your ascii tables are a good way of explaining this. Thanks! (Now I 
need a 3D version for eq, frozen, hash!)

----------

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

Reply via email to