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

Fredrik Lundh fredrik@pythonware.com
Wed, 3 Apr 2002 17:08:03 +0200


mark wrote:

> Hmm, I'm not sure I follow.
>=20
> This is Python without the PEP:
>=20
> falseValues =3D [{}, [], 0, None]
> for x in falseValues:
>     if not x:
>         print "%s is 'false'." % x
>=20
> This is Python with the PEP:
>=20
> falseValues =3D [{}, [], 0, None, False]
> for x in falseValues:
>     if not x:
>         print "%s is 'false'." % x
>=20
> 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>