[Python-3000] removing destructuring del

Guido van Rossum guido at python.org
Fri Feb 22 02:25:32 CET 2008


What syntax would you allow instead? Just del variable, variable, ...?

On Wed, Feb 20, 2008 at 12:45 PM, Andrew Dalke
<dalke at dalkescientific.com> wrote:
> For lack of a better term, I'll call this a destructuring del
>
>     del (a, (b, (c)))
>
>  I propose that it should not be valid in Python 3.
>
>  It's supported in 2.x and 3.0a2.  It's never caused anyone problems.
>  No one (that I can find through 10 minutes of grepping) uses it.
>  When I figured out that I could do it, by looking at the grammar, I
>  didn't believe it was valid.  I still can't figure out why anyone
>  would use it.
>
>  Python 3 removes support for destructuring in function calls
>
>  def f((a,b)):  # SyntaxError in Python3
>     pass
>
>  and I think this falls into the same category.
>
>  I would even argue that
>
>     del(x)
>
>  should not be allowed because it's suggests and is likely based on
>  the false belief that 'del' is a function call.  But I'm not
>  proposing getting rid of return(x).
>
>
>                                 Andrew
>                                 dalke at dalkescientific.com
>
>
>  _______________________________________________
>  Python-3000 mailing list
>  Python-3000 at python.org
>  http://mail.python.org/mailman/listinfo/python-3000
>  Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list