On 15 October 2017 at 06:43, Nick Coghlan <email@example.com> wrote:
> def _results_gen(data):> # Generator form
> for item in data:
> with adjusted_context():
> yield calculate_result(item)
> results = _results_gen(data)
> Today, while these two forms look like they *should* be comparable, they're
> not especially close to being semantically equivalent, as there's no
> mechanism that allows for implicit context reversion at the yield point in
> the generator form.
I'll have to take your word for this, as I can't think of an actual
example that follows the pattern of your abstract description, for
which I can immediately see the difference.