Skip to content

Python: hash value of objects not available as __hash__ method #185

@klayoutmatthias

Description

@klayoutmatthias

Currently, the hash value of objects is available as "hash" method (as in Ruby), but not as "hash" which would enable KLayout's objects as keys for sets for example.

A quick workaround is to monkey patch the respective object, i.e.

pya.Point.__hash__ = pya.Point.hash

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