
On 09/28/2015 11:29 AM, Guido van Rossum wrote:
On Mon, Sep 28, 2015 at 9:02 AM, Jeff Hardy <jdhardy@gmail.com <mailto:jdhardy@gmail.com>> wrote:
-1 on the propagating member-access or index operators
Can someone explain with examples what this refers to?
"Member-access or index operators" refers to the proposed ?. or ?[ operators. "Propagating" refers to the proposed behavior where use of ?. or ?[ "propagates" through the following chain of operations. For example: x = foo?.bar.spam.eggs Where both `.spam` and `.eggs` would behave like `?.spam` and `?.eggs` (propagating None rather than raising AttributeError), simply because a `.?` had occurred earlier in the chain. So the above behaves differently from: temp = foo?.bar x = temp.spam.eggs Which raises questions about whether the propagation escapes parentheses, too: x = (foo?.bar).spam.eggs Carl