On 3/19/22, Eryk Sun <eryk...@gmail.com> wrote:
> On 3/18/22, Ronald Oussoren via Python-Dev <python-dev@python.org> wrote:
>>
>> - if __slots__ is a dict keep it as is
>> - Otherwise use tuple(__slots__) while constructing the class and store
>> that
>> value in the __slots__ attribute of the class
>
> If this is just for pydoc, then it can be updated with new behavior.
> For example, if the given __slots__ is a dict, set it as something
> like __slots_doc__, and rewrite __slots__ as a tuple of the keys.

Or extend pydoc to support a mappingproxy for __slots__.
_______________________________________________
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/NPIZQIZ5OPYU6V7YIGK5TZ75Z6WIOK5O/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to