3 ms·
The article starts with a poll showing Versions A), B) and C). Implicit in that poll would be that all three "versions" produce the same behavior. Options A) a
by Rygian 4y ago
The article starts with a poll showing Versions A), B) and C). Implicit in that poll would be that all three "versions" produce the same behavior.
Options A) and B) conflate None with non-existent key: if the key is set and has value None, they will return ItemNotFound. Option C) on the other hand treats them separately and will happily return None (instead of raising exception) when the key exists and its value is None.