Perl is worse! (was: Python is Wierd!)
Gisle Aas
gisle at ActiveState.com
Fri Jul 28 08:59:59 EDT 2000
"Tim Peters" <tim_one at email.msn.com> writes:
> [Steve Lamb]
> > ...
> > I just don't understand how people can advocate for types and the
> > restrictions they impose while, on the other hand, embracing a
> > language that is free enough to shoot yourself in the foot by
> > reassigning None.
>
> Frankly, I have trouble understanding that too. Yet here we are, year after
> year!
>
> [Chris Lawrence ]
> > Hmm, works in JPython too. And Python 2.0b1. Maybe it's a feature ;-)
> >
> > Frankly, I don't know how you'd get None back.
>
> If you really must,
>
> import __builtin__
> None = __builtin__.None
>
> Same as for any other builtin you go out of your way to destroy. In the
> case of None, though, simpler tricks will suffice, like
>
> None = [].sort()
Even simpler is
del(None)
--
Gisle Aas
More information about the Python-list
mailing list