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

Mark McEahern marklists at mceahern.com
Wed Apr 3 09:46:02 EST 2002


[Fredrik Lundh]
> more than one way to do it.  more than one concept to
> explain to newcomers.  more than one "obviously correct"
> way to do things.  less is more.  etc.

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.

Would the above be clearer if I called the collection of false values
'nothingValues' instead?  I, personally, don't think so.

// mark





More information about the Python-list mailing list