23 Jul
2018
23 Jul
'18
4:58 p.m.
On 2018-07-23 10:51, Steve Dower wrote: [snip]
False: 'a?.b' is totally different from 'a.b' ---------------------------------------------
The expression 'a.b' either results in 'a.b' or AttributeError (assuming no descriptors are involved).
The expression 'a?.b' either results in 'a.b' or None (again, assuming no descriptors).
It could still raise AttributeError.
This isn't a crazy new idea, it really just short-circuits a specific error that can only be precisely avoided with "if None" checks (catching AttributeError is not the same).
[snip]