I couldn't egrep anything similar from lib or demo/scripts so I believe
you. It must have been some random posted code - I KNOW I didn't think
of it myself. I can only assume that in the cases where I did use it,
the effects were in a local scope and got thrown away. This more
limited usage must have been the intent of the original user, but
somehow, increased familiarity fooled me into wrongly generalizing
> The key to understanding what happened in your example is that the
> *name* None gets no special treatment from the compiler -- it is just
> a name initialized in module builtin to the *value* None. BTW this
> won't happen easily in functions, since there the assignment to None
> creates a local variable named None which probably won't be used
> elsewhere in the function.
> What *does* work is "void = f(x)" where void can be any name not
> otherwise used. (I often use dummy().)
I used to use "junk", but when I saw the use of "None" - I though
that was so clear and obvious an indicator of intent, I picked it
up right away.
Clearly, as a *Python* question, this is of minimal interest.
What is interesting to me NOW, is the psychology: I have read
about the unreliability of eye-witness accounts, and reconstructed
memory,etc. What amazes me here is the vividness of my misremembered
memory that I actually tested it! Once I became familiar enough
with the construct to take it for granted, I must have "constructed"
the memory that I had actually explicitly tested it, when what
appears to have happened was that I overgeneralized from a specific
[ This leads me to other ruminations on the psychology of computer
programming, which, luckily for YOU, I don't have time to go into
right now! But my recent overuse of the word "idiom" in connection
with programming languages is related to this direction: I've been
starting to look at programming languages more like real "languages"
than merely as "notations". ]