Perl is worse! (was: Python is Wierd!)
Gregory Lielens
gregory.lielens at fft.be
Fri Jul 28 04:44:02 EDT 2000
Chris Lawrence wrote:
[Snip]
>
> > 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.
>
> 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. And it will play havoc
> with things:
>
> None = 1
> if None:
> print 'Hello'
>
> I suspect Guido will tell you, "don't do that." ;-)
>
> Chris
It seems that del(None) do the trick...
By the way, I am almost a complete Python beginner, so my knowledge of
Python syntax is far -really far- from complete...
I just tried undef(None), got a NameError, then del(None) and whohaa!
"Second guess without reading the doc works" sure sounds like a good
language design / function name choice to me!
Greg.
More information about the Python-list
mailing list