[Python-Dev] None as a keyword / class methods

Peter Funk pf@artcom-gmbh.de
Thu, 23 Mar 2000 22:46:49 +0100 (MET)


Hi Barry!

> >>>>> "PF" == Peter Funk <pf@artcom-gmbh.de> writes:
> 
>     |     try:
>     |         del None
>     |     except SyntaxError:
>     |         pass # Wow running Py3K here!
 
Barry A. Warsaw:
> I know how to break your Py3K code: stick None=None some where higher
> up :)

Hmm.... I must admit, that I don't understand your argument.

In Python <= 1.5.2 'del None' works fine, iff it follows any assignment
to None in the same scope regardless, whether there has been a None=None
in the surrounding scope or in the same scope before this.

Since something like 'del for' or 'del import' raises a SyntaxError 
exception in Py152, I expect 'del None' to raise the same exception in
Py3K, after None has become a keyword.  Right?

Regards, Peter