[issue13814] Document why generators don't support the context management protocol

2021-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Note: Rietveld patch reviews are no longer accessible so I could not look at R. David's comments. -- ___ Python tracker ___

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 1e16217204c0e8e595c4d1e869c81899bfe3376b by Miss Islington (bot) in branch '3.10': bpo-13814: Explain why generators are not context managers (GH-26835) https://github.com/python/cpython/commit/1e16217204c0e8e595c4d1e869c81899bfe3376b

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset d881002fbdf12ddbd93db3e182dc5cdeb1f90386 by Miss Islington (bot) in branch '3.9': bpo-13814: Explain why generators are not context managers (GH-26835) https://github.com/python/cpython/commit/d881002fbdf12ddbd93db3e182dc5cdeb1f90386 -

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +25418 pull_request: https://github.com/python/cpython/pull/26837 ___ Python tracker ___ __

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 51f45d085dad3b708f6fe166af517aba69e7e9f7 by Terry Jan Reedy in branch 'main': bpo-13814: Explain why generators are not context managers (GH-26835) https://github.com/python/cpython/commit/51f45d085dad3b708f6fe166af517aba69e7e9f7 -- _

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +25417 pull_request: https://github.com/python/cpython/pull/26836 ___ Python tracker _

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added a simplified answer after a similar question about assignment and CMs. -- keywords: -easy ___ Python tracker ___ ___

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +25416 pull_request: https://github.com/python/cpython/pull/26835 ___ Python tracker ___ _

[issue13814] Document why generators don't support the context management protocol

2021-06-21 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy -patch versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker ___ __

[issue13814] Document why generators don't support the context management protocol

2016-01-02 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: needs patch -> patch review versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ _

[issue13814] Document why generators don't support the context management protocol

2015-04-21 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue13814] Document why generators don't support the context management protocol

2015-04-13 Thread R. David Murray
R. David Murray added the comment: Looks like the right approach, I hadn't thought of the design FAQ, but it makes sense as a place to put it. I made a couple of review comments. -- nosy: +r.david.murray ___ Python tracker

[issue13814] Document why generators don't support the context management protocol

2015-04-13 Thread Aidan Lowe
Changes by Aidan Lowe : -- keywords: +patch versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file38955/design.patch ___ Python tracker ___ ___

[issue13814] Document why generators don't support the context management protocol

2012-01-22 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13814] Document why generators don't support the context management protocol

2012-01-21 Thread Nick Coghlan
Nick Coghlan added the comment: Generators deliberately don't support the context management protocol. This is so that they raise an explicit TypeError or AttributeError (pointing out that __exit__ is missing) if you leave out the @contextmanager decorator when you're using a generator to wri