Skip to content

Add an empty tuple as __slots__ to istr #1360

Description

@jonathandung

Because istr is a str subclass and strings have no instance dictionaries, and especially in the case of this library where instances of istr are used as dictionary keys and many of them are created for large case-insensitive multidicts, it would be beneficial to have a __slots__ = () declaration in the class body of istr. This will save the memory allocated to create a dictionary every time a istr is constructed to be used as a key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions