I agree with David; this PEP has really gotten to a great place and the new organization makes it much easier to understand.
> On Aug 25, 2017, at 22:19, Ethan Furman <et...@stoneleaf.us> wrote: > > Why "lookup" and not "get" ? Many APIs use "get" and it's functionality is > well understood. I have the same question as Sven as to why we can’t have attribute access semantics. I probably asked that before, and you probably answered, so maybe if there’s a specific reason why this can’t be supported, the PEP should include a “rejected ideas” section explaining the choice. That said, if we have to use method lookup, then I agree that `.get()` is a better choice than `.lookup()`. But in that case, would it be possible to add an optional `default=None` argument so that you can specify a marker object for a missing value? I worry that None might be a valid value in some cases, but that currently can’t be distinguished from “missing”. I’d also like a debugging interface, such that I can ask “context_var.get()” and get some easy diagnostics about the resolution order. Cheers, -Barry
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ 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