A RetroSearch Logo

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

Search Query:

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

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

[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 09:55:48 -0600
[me]
> This is Python with the PEP:
> 
> falseValues = [{}, [], 0, None, False]
> for x in falseValues:
>     if not x:
>         print "%s is 'false'." % x

[Fredrik Lundh]
> can you explain how your second example covers
> everything that's in the PEP?

It doesn't cover everything in the PEP.

Here's how I think of the PEP:

With this PEP, we get to have our cake and eat it too:

	1.  There is one obviously correct way to return a truth value.
	2.  Polymorphous perversity with respect to truth still works.

What's everybody complaining about?

Cheers,

// 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