NoneType and new instances

Gregory Ewing greg.ewing at canterbury.ac.nz
Sat Jul 30 04:50:06 CEST 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