A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-July/154285.html below:

[Python-Dev] Examples for PEP 572

[Python-Dev] Examples for PEP 572Chris Angelico rosuav at gmail.com
Wed Jul 4 09:54:44 EDT 2018
On Wed, Jul 4, 2018 at 11:52 PM, David Mertz <mertz at gnosis.cx> wrote:
> On Wed, Jul 4, 2018 at 3:02 AM Chris Angelico <rosuav at gmail.com> wrote:
>>
>> "Assignment is a statement" -- that's exactly the point under discussion.
>> "del is a statement" -- yes, granted
>> "function and class declarations are statements" -- class, yes, but
>> you have "def" and "lambda" as statement and expression equivalents.
>> "import is a statement" -- but importlib.import_module exists for a reason
>>
>> I'm going to assume that your term "mutating" there was simply a
>> miswording, and that you're actually talking about *name binding*,
>> which hitherto occurs only in statements. Yes, this is true.
>
>
> Nope, not actually:
>
>>>> del foo
>>>> print(globals().update({'foo':42}), foo)
> None 42
>

Try it inside a function though.

ChrisA
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4