Skip to content

Make empty mapping a singleton #20

@hukkin

Description

@hukkin

We might want to consider making the same optimization for empty mappings that CPython does for the builtin immutable types tuple and frozenset: make the empty mapping a singleton.

For reference, consider:

tuple() is tuple()
# True

frozenset() is frozenset()
# True

import immutables
immutables.Map() is immutables.Map()
# False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions