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/022185.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 10:59:49 -0600
[Barry A. Warsaw]
> The strongest con for PEP 285 seems to be the natural inclination for
> people to want to write "if cond == True:".

I don't see why you want to blame that inclination on PEP 285.  Folks are
perfectly capable of monstrosities like this without it:

	x = isinstance(foo, bar)
	if x == 1:
		...

If, as Fredrik says, there's already one obvious way to return True (and
that's the int 1), then we already have the problem that people will be
inclined to compare something to this canonical truth in conditional
statements.

I suppose you're saying that PEP 285 makes it worse?  I have no idea whether
you're right.  It certainly doesn't make ME more likely to do it.  ;-)

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