On Feb 22, 2008, at 2:25 AM, Guido van Rossum wrote:
> What syntax would you allow instead? Just del variable, variable, ...?
Yes. These are and should be legal
del a, b[1], c.d
del (e+f).g[9]().h
but I think this should not be legal
del a, (b, c)
That should raise
SyntaxError: can't delete tuple
and I would also like it if the following raised the same error
del (a, b)
but people use it now and I can see that perhaps, like with the from
statement, using '()' for long expressions is useful
del (some_very_large_variable_name[1],
another_large_variable_name[2].with_attribute)
I also think
del a,
should not be legal ("SyntaxError: trailing comma not allowed without
surrounding parentheses"?), but that's getting into my own personal
preferences.
Andrew
[EMAIL PROTECTED]
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com