Names changed to protect the guilty

Neil Cerutti horpner at
Sat Oct 7 03:27:44 CEST 2006

On 2006-10-07, 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. But I guess I'm an atheist
> when it comes to PEP 8. If it is clearer to you to make the
> condition explicit ("blah not False"), rather than implicit
> ("not blah"), then use the former. I say write the code the way
> *you* (and your team if applicable) are best able to read,
> write and maintain it. Then when other people tell you that it
> isn't good style, or isn't "pythonic," just stab them in the
> face with soldering iron ala Chris Walken. :)

I agree on both points. It's a style issue, and that hidden tests
(taking advantage of how certain objects convert to boolian
values) is harder to read.

Neil Cerutti

More information about the Python-list mailing list