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/2017-September/149277.html below:

[Python-Dev] PEP 550 v4

[Python-Dev] PEP 550 v4 [Python-Dev] PEP 550 v4Greg Ewing greg.ewing at canterbury.ac.nz
Thu Sep 7 03:00:43 EDT 2017
Yury Selivanov wrote:
> I still think that giving Python programmers one strong rule: "context
> mutation is always isolated in generators" makes it easier to reason
> about the EC and write maintainable code.

Whereas I think it makes code *harder* to reason about,
because to take advantage of it you need to be acutely
aware of whether the code you're working on is in a
generator/coroutine or not.

It seems simpler to me to have one rule for all kinds
of functions: If you're making a temporary change to
contextual state, always encapsulate it in a with
statement.

-- 
Greg
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