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

Fredrik Lundh fredrik at pythonware.com
Wed Apr 3 10:08:03 EST 2002


mark wrote:

> Hmm, I'm not sure I follow.
> 
> This is Python without the PEP:
> 
> falseValues = [{}, [], 0, None]
> for x in falseValues:
>     if not x:
>         print "%s is 'false'." % x
> 
> This is Python with the PEP:
> 
> falseValues = [{}, [], 0, None, False]
> for x in falseValues:
>     if not x:
>         print "%s is 'false'." % x
> 
> I don't see this vast conceptual chasm between pre and post PEP that you
> appear to see.  Please help me understand.

can you explain how your second example covers
everything that's in the PEP?

can you explain why the second version is "better",
in any sense of that word?

</F>





More information about the Python-list mailing list