NoneType and new instances
Gregory Ewing
greg.ewing at canterbury.ac.nz
Fri Jul 29 22:50:06 EDT 2011
Steven D'Aprano wrote:
> As for True and False, bool has to be able to return them, because the whole
> purpose of exposing bool is so people can call it: if bool(some_value) was
> an error, that would defeat the purpose of having bool!
Bool is different, because it doubles as a function for
coercing things to bool. There's no corresponding concept
of coercing something to None, or Ellipsis, etc.
--
Greg
More information about the Python-list
mailing list