A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-April/022167.html below:

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

[Python-Dev] Re: PEP 285: Adding a bool typeMark McEahern marklists@mceahern.com
Wed, 3 Apr 2002 08:46:02 -0600
[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




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4