[Python-Dev] Re: PEP 285: Adding a bool type

Mark McEahern marklists@mceahern.com
Wed, 3 Apr 2002 12:14:27 -0600


[Ka-Ping Yee]
> Consider this:
>
>     >>> a = [0, False, 1, True]
>
>     >>> print a
>     [0, 0, 1, 1]
>
>     >>> for x in a: print x
>     0
>     0
>     1
>     1

Actually, if you use the sample code provided by the PEP and run this you
get:

  >>> a = [0, False, 1, True]
  >>> print a
  [0, False, 1, True]

  >>> for x in a: print x
  0
  False
  1
  True