Letting context managers react to yields inside their scope
29 Apr
2015
29 Apr
'15
8:22 p.m.
Hi all, Well, after a few days no-one has responded to my post on another thread about this [1], but the more I thought about it the more this seemed like a good idea, so I wrote up a little more-formal proposal (attached) for letting context managers react to 'yield's that occur within their 'with' block. This should in many ways be treated as a straw man proposal -- there's tons I don't know about how async code is written in Python these days -- but it seems like a good idea to me and I'd like to hear what everyone else thinks :-). -n [1] https://mail.python.org/pipermail/python-ideas/2015-April/033176.html -- Nathaniel J. Smith -- http://vorpus.org
3255
Age (days ago)
3256
Last active (days ago)
14 comments
5 participants
participants (5)
-
Eric Snow
-
Guido van Rossum
-
Nathaniel Smith
-
Nick Coghlan
-
Yury Selivanov