Message310417
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!) |
|
Date |
User |
Action |
Args |
2018-01-22 11:02:11 | eric.smith | set | recipients:
+ eric.smith, larry, levkivskyi |
2018-01-22 11:02:11 | eric.smith | set | messageid: <1516618931.77.0.467229070634.issue32513@psf.upfronthosting.co.za> |
2018-01-22 11:02:11 | eric.smith | link | issue32513 messages |
2018-01-22 11:02:11 | eric.smith | create | |
|