getting back None (was: Re: Perl is worse! (was: Python is Wierd!))
Peter Schneider-Kamp
nowonder at nowonder.de
Fri Jul 28 03:50:00 EDT 2000
Steve Lamb wrote:
>
> If you could get None back (which you can so long as you assigned None to
> something else before reassigning it) there can be some practical applications
> to that.
There is no need to assign None to something before assigning to None.
>>> None=1
>>> if None:
... print "hi"
...
hi
>>> del None
>>> if None:
... print "hi"
...
>>> del None
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: None
just-delete-it-and-be-happi-ly y'rs
Peter
--
Peter Schneider-Kamp ++47-7388-7331
Herman Krags veg 51-11 mailto:peter at schneider-kamp.de
N-7050 Trondheim http://schneider-kamp.de
More information about the Python-list
mailing list