a.b?(p, q).c.d[x, y] === None if a.b is None else a.b(p, q).c.d[x, y]a.b?[x, y].c.d(p, q) === None if a.b is None else a.b[x, y].c.d(p, q)I forgot to think about the scope of the uptalk operator (i.e. what is skipped when it finds a None). There are some clear cases (the actual implementation should avoid double evaluation of the tested expression, of course):a.b?.c.d[x, y](p, q) === None if a.b is None else a.b.c.d[x, y](p, q)
But what about its effect on other operators in the same expression? I think this is reasonable:a?.b + c.d === None if a is None else a.b + c.d
f(a?.b) === f((None if a is None else a.b))(a?.b, x) === ((None if a is None else a.b), x)It also shouldn't escape out of comma-separated lists, argument lists, etc.: