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

Make Quantity a full class #27

Closed
khaeru opened this issue Feb 8, 2021 · 0 comments · Fixed by #37
Closed

Make Quantity a full class #27

khaeru opened this issue Feb 8, 2021 · 0 comments · Fixed by #37
Assignees
Labels
enh New feature or request

Comments

@khaeru
Copy link
Owner

khaeru commented Feb 8, 2021

Currently Quantity() is a function with a name that makes it seem like a class.

This means it's not possible to do:

if isinstance(foo, Quantity)

…or to use it in type annotations for computation functions.

Using a metaclass like QuantityMeta should make it possible to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enh New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant