Python 3 removes name binding from outer scope
Ben Finney
ben+python at benfinney.id.au
Tue Jul 25 03:02:48 EDT 2017
Ben Finney <ben+python at benfinney.id.au> writes:
> Having to make another name for the same object, merely to avoid some
> surprising behaviour, is IMO un-Pythonic.
I suppose my objection is rooted in the fact this behaviour is implicit;
my code has not issued a ‘del’ statement, and so I don't expect one; yet
it occurs implicitly. This violates the Zen of Python.
> PEP 3000 documents the change::
I got the wrong number there; it's PEP 3110.
--
\ “Please do not feed the animals. If you have any suitable food, |
`\ give it to the guard on duty.” —zoo, Budapest |
_o__) |
Ben Finney
More information about the Python-list
mailing list