On 08/23/2017 12:17 PM, Yury Selivanov wrote: >> How about ExecutionContext and ContextVars ? > >> We are already used to different levels of variables: global, local, non-local, class. I think having variables tied to a Context, and having search flow back to previous Contexts, would be easy to understand. > > Yeah, I had this idea about ContextVars and so far I like it more than > Context Keys and Context Values. > > In the next version of the PEP (will post it soon), we use Execution > Context, Logical Context, and Context Variable terminology (the debate > if we should use other names is, of course, still open). ContextVars is actually a different name for LogicalContext. So it would be: ExecutionContext = [ContextVars()[, ContextVars()[ ...]]] and you get the (thread.local similar) ContextVars by context_vars = sys.get_context_vars() # or whatever context_vars.verbose = ... -- ~Ethan~
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