On 7/12/2017 7:35 AM, Rhodri James wrote:
On 12/07/17 03:29, Stefan Ram wrote:
Grant Edwards <grant.b.edwa...@gmail.com> writes:
False is required to be a singleton.

   »singleton« usually means »the sole object of its class«.

       »Ensure a class only has one instance, and provide a
       global point of access to it.« - Gamma et al.

type( False )
<class 'bool'>

type( True )
<class 'bool'>

   It seems, »False« is not a singleton under the
   implementation of Python I used.

The point that was being made is that there are no other bools than True and False, and they are distinct from the objects 1 and 0.

By analogy with 'singleton', True and False constitute a 'doubleton' in the sense of being the sole 2 objects of class Bool.

--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to