Names changed to protect the guilty

Aahz aahz at
Sat Oct 7 16:14:38 CEST 2006

In article <1160201214.367444.250270 at>,
John Machin <sjmachin at> wrote:
>Aahz wrote:
>> In article <1160182951.812677.178750 at>,
>> MonkeeSage <MonkeeSage at> wrote:
>>>On Oct 6, 6:27 pm, a... at (Aahz) wrote:
>>>> The following line of lightly munged code was found in a publicly
>>>> available Python library...
>>>Yes, this violates the Holy, Inspired, Infallible Style Guide (pbuh),
>>>which was written by the very finger of God when the world was still in
>>>chaotic darkness.
>> Did you actually analyze the line of code?  Particularly WRT the way it
>> operates in different versions of Python?
>A comment on the "style" issue, before we get into the real WTF
>analysis: any function/method whose name begins with "has" or "is"
>returns an honest-to-goodness actual bool (or what passed for one in
>former times). IMHO, any comparison with [] being regarded as false and
>[0] being regarded as true is irrelevant, and writing "has_something()
>== False" or "has_something() is False" is utterly ludicrous.

Exactly.  Another way of putting this: it's so wrong, it isn't even
Aahz (aahz at           <*>

"If you don't know what your program is supposed to do, you'd better not
start writing it."  --Dijkstra

More information about the Python-list mailing list