On Mon, Jan 8, 2018 at 2:35 PM, Victor Stinner <victor.stin...@gmail.com> wrote: > ctx[var] raises an exception but ctx.get(var) returns None in such case. My > point is just that Context.get() behaves differently than dict.get(). If > dict[key] raises, I expect that dict.get() raises too and that I have to > write explicitely dict.get(default=None).
But that's not how dict.get works? In [1]: d = {} In [2]: print(d.get(1)) None -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ 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