Boolean tests [was Re: Attack a sacred Python Cow]

Russ P. Russ.Paielli at gmail.com
Wed Jul 30 19:22:19 EDT 2008


On Jul 30, 1:07 am, Erik Max Francis <m... at alcyone.com> wrote:
> Russ P. wrote:
> > Oh, Lordy. I understand perfectly well how boolean tests, __len__, and
> > __nonzero__ work in Python. It's very basic stuff. You can quit
> > patronizing me (and Carl too, I'm sure).
>
> You suggested a syntax for testing non-emptiness (`x is not empty`)
> which indicated a profound misunderstanding of what the `is` operator does.
>
> You then acknowledged that there might be a problem because of the
> implication if the `is` operator and weren't sure whether it would work
> or not:

Oh, my. I wrote something like, "It would sure be nice to be able to
write

if x is not empty:

because it reads like natural language. Immediately after I posted it,
I thought, "oh, I'll bet some idiot takes that as a serious proposal."
Sure enough, some idiot did just that almost immediately. And he is
still patronizing me for it.

Hey, dude, if you think I ever had any doubt about what "is" means in
Python, you are simply wrong. Completely wrong. Can you get that
through your thick skull?

One of the problems with this site is that you have pedants who like
to show off their knowledge of the Python language. I suspect that
many of these people know little more than the rules of programming in
Python. They are like someone who thinks he is a writer because he
knows how to use Microsoft Word, or someone who thinks he is a chess
expert because he knows the rules for moving the pieces.





More information about the Python-list mailing list