On 3/29/22 09:14, Christopher Barker wrote:

> [...] I tried to use __slots__ in TupleWithNames, but apparently you can't 
use __slots__ in a
> tuple subclass ('cause tuple's already using it ??) -- but that could be done 
in a builtin.
> then it wouldn't need a __dict__

The `__dict__` is needed to store the field names -- did you add `__dict__` to the `__slots__`? (Of course, if you've added `__dict__` then you lose the limited size of `__slots__`.)

--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/B3JZKXQ4HDW5IRNMYKDKB5QFGHRR42AH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to