On 3/18/2022 2:38 PM, Eric V. Smith wrote:
There a practical need for these changes. See https://bugs.python.org/issue46382 for a case where dataclasses needs __slots__ to be iterated over after the class has been created. And it would be good if __slots__ accurately reflected the slots that were actually created.

It seems totally sufficient for dataclasses to require that base class __slots__ are a string or iterables of strings. Which is apparently what would happen today, since anything else would cause incorrect behaviour.

A single special case doesn't have to become a language-wide backwards compatibility break, even if it perhaps would've been better to have had the restriction from the start.

Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/R5PBNN36BMUM72QPRJG4DAHSD6UKUY3O/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to