Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable __hash__ on all Pybricks object types. #876

Closed
dlech opened this issue Dec 23, 2022 · 0 comments
Closed

Enable __hash__ on all Pybricks object types. #876

dlech opened this issue Dec 23, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: MicroPython Issues related to the MicroPython programming language

Comments

@dlech
Copy link
Member

dlech commented Dec 23, 2022

Is your feature request related to a problem? Please describe.
I want to use a Motor object as the key in a dictionary. It current fails with TypeError: unsupport type for __hash__.

Describe the solution you'd like
All types should implement hash.

@dlech dlech added enhancement New feature or request software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: MicroPython Issues related to the MicroPython programming language labels Dec 23, 2022
@dlech dlech self-assigned this Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: MicroPython Issues related to the MicroPython programming language
Projects
None yet
Development

No branches or pull requests

1 participant