On Thu, Mar 12, 2020 at 10:43 AM Andrew Barnert via Python-ideas
<[email protected]> wrote:
> Also, you need to think through what happens with a del expression inside all 
> kinds of contexts that currently can’t have del—eval, lambdas and 
> comprehensions (can I del something from the outer scope?), etc.; just 
> defining what it does in the specific case of deleting the loop variable 
> isn’t sufficient.

del VAR currently follows the same scoping rules as VAR = EXPR, so I
think that a hypothetical (del VAR) expression could and should follow
the same scoping rules as (VAR := EXPR).

del VAR essentially is an assignment, but of a "null pointer" instead
of an object reference.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/LX255J27SYFBS5A5K2PT7DHCUI33EN3E/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to