None

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Fri, 10 Dec 1993 11:19:00 -0500

I picked up the idiom:
None = f( x )
from some random piece of Python code ( in the library ? in the demo's ? )
as a notation that I was throwing away the value of f(x) and didn't
want it printed either. I think the code where I saw it originally
did something like:

a, None, None, b, c, None = tuple_returning_function( )

to only grab the needed unpacked values.

I *THINK*, long ago, I actually checked that None *DIDN'T* actually
get a value assigned to it. In any event, it never got me into
trouble before, so I had come to assume that 'None' was sort of
like the risc zero-register.

Now, I HAVE gotten into trouble using it. And now I discover that:

>>>None
>>>None = 1
>>>None
1

Has this behaviour changed ?
Or is my memory totally false about what it USED to do ?

Help!!! I'm about to dump core over this !!!

- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biological Physics