Showing content from http://mail.python.org/pipermail/python-dev/attachments/20180105/972c6cef/attachment.html below:
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 5, 2018 at 2:05 AM, Victor Stinner <span dir="ltr"><<a href="mailto:victor.stinner@gmail.com" target="_blank">victor.stinner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">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.<br clear="all"></div></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">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.<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>
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