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

Aahz aahz at pythoncraft.com
Wed Apr 3 17:16:59 EST 2002


In article <mailman.1017851533.5911.python-list at python.org>,
Kevin Jacobs  <jacobs at penguin.theopalgroup.com> wrote:
>On Wed, 3 Apr 2002, Fredrik Lundh wrote:
>> Andrew Koenig wrote:
>>>
>>> Specifically: If I want to write a function that answers a yes/no
>>> question, I have lots of possible ways of spelling yes (1, 2, "yes",
>>> and so on) and lots of possible ways of spelling no (0, {}, None,
>>> and so on).  There isn't a single preferred way.
>> 
>> if you study real python code, you'll find that there is.
>
>Having managed 200k+ LOC Python projects with at times 20+ developers, I
>find that there isn't.  At least not without getting out a baseball bat.
>
>The first thing many of our programmers want to do at the top of their
>modules is to define:
>
>False = 0
>True = not False
>
>  [...]

Here's the tricky question: will you have to wield the bat any less to
get them to stop writing

if x == True:
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list