[Python-ideas] Null coalescing operator
Random832
random832 at fastmail.com
Thu Oct 27 12:41:21 EDT 2016
More information about the Python-ideas mailing list
Thu Oct 27 12:41:21 EDT 2016
- Previous message (by thread): [Python-ideas] Null coalescing operator
- Next message (by thread): [Python-ideas] Null coalescing operator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Oct 27, 2016, at 11:27, Joonas Liik wrote: > perhaps just having a utility function can get us some of the way there.. > > #may error > r = a.b.x.z > > # will default to None > r = a?.b?.x?.z If a.b can't or shouldn't be None, this should be a?.b.x.z I'm not certain how your utility function is supposed to differentiate this case, or handle subscripts or method calls. > r = get_null_aware(a, "b.x.z") # long but no new syntax, can be > implemented today.
- Previous message (by thread): [Python-ideas] Null coalescing operator
- Next message (by thread): [Python-ideas] Null coalescing operator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list