Skip to content

Find a way to detect whether builtin/extension classes have __dict__ #8

Open
@ariebovenberg

Description

Some builtin/extension classes have a __dict__...

>>> RuntimeError().__dict__
{}

...while others do not

>>> list().__dict__  # error
>>> Decimal().__dict__  # error

I haven't found a way to be able to distinguish these, without instantiating an instance.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions