[Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module

Chris Barker - NOAA Federal chris.barker at noaa.gov
Wed Feb 14 20:49:18 EST 2018


>
> So as long as you are not expecting to ever need mypy you should be fine -- however if you're sharing code at some point someone is probably going to want to point mypy at it.

mypy isn’t an “official” tool, but PEP484 is — and mypy is more or
less a reference implimentation, yes?

mypy support bool, as far as I can tell, will that not work for your case?

Even though the python bools are integer subclasses, that doesn’t mean
a type checker shouldn’t flag passing an integer in to a function that
expects a bool.

-CHB


More information about the Python-ideas mailing list