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

Mark 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

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.  ;-)


// mark