Stephan Houben wrote: > Nope, the introduction of the tmp variable changed the semantics. It isn't a > "chain" anymore so it breaks shortcutting.
I'm confused. Assume 'a' is not defined. With Python's dot (attribute access) we have >>> a.b.c NameError: name 'a' is not defined >>> a.(b.c) SyntaxError: invalid syntax >>> (a.b).c NameError: name 'a' is not defined I'd expect, after PEP 505 is added to Python that we'd get >>> a ?. b ?. c NameError: name 'a' is not defined >>> a ?. (b ?. c) SyntaxError: invalid syntax >>> (a ? . b) ?. c NameError: name 'a' is not defined If this is not correct, please some do tell me what we would get. Now assume 'a' is defined. I'd also expect, for any value for 'a', that >>> tmp = (a ?. b) >>> val = tmp ?. c give val the same value as >>> val = (a ?. b) ?. c If this is not so, then can the second val be computed from tmp? And if so, how? -- Jonathan _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/