On Friday, January 5, 2018 5:43:24 PM EST Chris Jerdonek wrote: > Is there a reason ContextVar needs to be exposed publicly at all? For > example, the API could use string keys like contextvars.get(name) or > Context.get(name) (class method). There could be separate functions > to initialize keys with desired default values, etc (internally > creating ContextVars as needed). Mainly because the design of contextvars follows the spirit of threading.local() (but see [1]). A ContextVar is not unlike a global variable, and we don't normally write globals()['foo']. Elvis [1] https://www.python.org/dev/peps/pep-0550/#replication-of-threading-local-interface
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