19 Mar
2022
19 Mar
'22
5:50 p.m.
On 3/19/22, Eryk Sun <eryksun@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__.