On Sat, Sep 10, 2016, at 19:38, David Mertz wrote:
>     x2 = x?.foo
> 
>     x3 = x?.bar?.baz?[x2]

A. if you're doing three different things with x, why are you using this
instead of wrapping it in an if statement?

B. Under some of the proposals, unless x.bar might be None independently
of x not being None, this would just be "x?.bar.baz[x2]
 
>     x4 = x?(x?.val)

C. Under some of the proposals, the inner contents of the call brackets
aren't evaluated if x is None, so you don't need to use x?.val here.

>     result = x3?(x4)
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to