MRAB wrote: > On 2013-02-08 07:22, Steven D'Aprano wrote:
>> Prior to Python 3, the special method __bool__ was spelled __nonempty__, >> which demonstrates Python's philosophy towards duck-typing bools. >> > Incorrect, it was spelled __nonzero__. Oops, so it was. Sorry for the brain-fart. __nonzero__ or not, nevertheless the implication still applies: all types are meant to map to "nothing" (zero) or "not nothing" (non-zero). -- Steven -- http://mail.python.org/mailman/listinfo/python-list