2 ms·
The issue is if the dictionary has a key defined and the value is None. Your get expression will return None, causing your next access to raise an error.
by smilliken 3y ago
The issue is if the dictionary has a key defined and the value is None. Your get expression will return None, causing your next access to raise an error.
- ddejohn 3y agoAh, I see. Still, I'd just catch that exception and move on because it's obvious you won't have anything more deeply nested anyway. Blowing up on `None` is an easy short-circuit.