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

[Rejected] New Boolean abstract base class for type validation supporting both bool and np.bool_ #11

Open
smarie opened this issue Sep 7, 2020 · 1 comment
Labels

Comments

@smarie
Copy link
Owner

smarie commented Sep 7, 2020

The idea is simple: today you can use numbers.Integral to denote an integer that can be an int or a np.int_. You have numbers.Real for real numbers similarly, etc. But you do not have an equivalent for booleans.

This was discussed here to the point it was accepted by Guido: https://groups.google.com/g/python-ideas/c/-3QW3cxj3ko/discussion?pli=1

Then it was re-discussed here to the point it was rejected: https://bugs.python.org/issue32886

@smarie smarie changed the title New Boolean abstract base class [Rejected] New Boolean abstract base class Sep 7, 2020
@smarie smarie added the valid8 label Sep 7, 2020
@smarie
Copy link
Owner Author

smarie commented Sep 7, 2020

Note: an implementation is available here: https://github.com/smarie/python-valid8/blob/master/valid8/utils/typing_tools.py

@smarie smarie changed the title [Rejected] New Boolean abstract base class [Rejected] New Boolean abstract base class for type validation supporting both bool and np.bool_ Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant