On Wed, Sep 6, 2017 at 5:06 PM, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > Nathaniel Smith wrote: >> >> The implementation strategy changed radically between v1 >> and v2 because of considerations around generator (not coroutine) >> semantics. I'm not sure what more it can do to dispel these feelings >> :-). > > > I can't say the changes have dispelled any feelings on my part. > > The implementation suggested in the PEP seems very complicated > and messy. There are garbage collection issues, which it > proposes using weak references to mitigate.
"messy" and "complicated" doesn't sound like a valuable feedback :( There are no "garbage collection issues", sorry. The issue that we use weak references for is the same issue why threading.local() uses them: def foo(): var = ContextVar() var.set(1) for _ in range(10**6): foo() If 'var' is strongly referenced, we would have a bunch of them. > There is also > apparently some issue with long chains building up and > having to be periodically collapsed. None of this inspires > confidence that we have the basic design right. > > My approach wouldn't have any of those problems. The > implementation would be a lot simpler. Cool. Yury _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com