concrete.util.unnone module¶
-
concrete.util.unnone.
dun
(d)¶ If l is None return an empty dict, else return l. Simplifies iteration over dict fields that might be unset.
Parameters: d (dict) – input dict (or None) - Return
- d, or an empty dict if d is None
-
concrete.util.unnone.
lun
(l)¶ If l is None return an empty list, else return l. Simplifies iteration over list fields that might be unset.
Parameters: l (list) – input list (or None) - Return
- l, or an empty list if l is None
-
concrete.util.unnone.
sun
(s)¶ If l is None return an empty set, else return l. Simplifies iteration over set fields that might be unset.
Parameters: s (set) – input set (or None) - Return
- s, or an empty set if s is None