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

Russ P. Russ.Paielli at
Thu Jul 31 04:36:53 CEST 2008

On Jul 30, 7:05 pm, Erik Max Francis <m... at> wrote:
> Russ P. wrote:
> > On Jul 30, 1:07 am, Erik Max Francis <m... at> 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.
> Yes, all people are idiots for reading what you wrote, reading your
> later realization that it was wrong, and taking both at face value.
> I'll be sure never to make that mistake again!
> > And he is
> > still patronizing me for it.
> No, I'm not patronizing you for your initial misstatement.  I'm mocking
> you for your pathetic and transparent attempt to backpedal away from it.
>   Just give it up, already.
> --
> Erik Max Francis && m... at &&
>   San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
>    Drifting from woman-who-tries misconstrued / Shifting to woman-wise
>     -- Lamya

The reason I wrote that "it would be nice to be able to write"

if x is not empty:

is that it reads naturally. It was not an actual proposal, and the
fact that you took it as such was *your* mistake. I can understand
your misunderstanding one time, but you have now repeated it three
times, despite my (unnecessary) explanations. One more time, and you
graduate from idiot to moron.

Having said that, the syntax I wrote *could* conceivably work IF all
empty lists pointed to one empty list, just as all values set to None
actually point to the same None. That is possible, but probably not a
good idea.

me repeat that for you: I DID NOT CLAIM THAT THIS IS THE WAY TO DO IT!
Did you get that, idiot?

More information about the Python-list mailing list