
July 22, 2018
10:26 a.m.
On 22 July 2018 at 11:13, Giampaolo Rodola' <g.rodola@gmail.com> wrote:
- "a?[2] ?? 3" means "index 2 of list a is picked up if a is not None, else use 3"
Actually, doesn't it mean if a is not None, pick up index 2 of the list. If a is None, OR IF a[2] IS NONE, then use 3. If a is None but a[2] is not None, use a[2]. ? Which is subtly different, and probably at least as prone to "accidental" errors as some of the constructs the None-aware operators are intended to replace. Paul