On Fri, Jan 5, 2018 at 2:05 AM, Victor Stinner <victor.stinner at gmail.com> wrote: > Currently, Context.get(var) returns None when "var in context" is false. > That's surprising and different than var.get(), especially when var has a > default value. > I don't see the problem. Context.get() is inherited from Mapping.get(); if you want it to raise use Context.__getitem__() (i.e. ctx[var]). Lots of classes define get() methods with various behaviors. Context.get() and ContextVar.get() are just different -- ContextVar is not a Mapping. -- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180105/972c6cef/attachment.html>
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