Nice article, very much looking forward to seeing what 3.10 has to offer 😀
In your dictionary example, you can call .get(key, default) on a dict where default is returned if key isn’t a valid key. It’s great for when you’d otherwise need to handle KeyError
Nice article, very much looking forward to seeing what 3.10 has to offer 😀
In your dictionary example, you can call
.get(key, default)
on a dict wheredefault
is returned ifkey
isn’t a valid key. It’s great for when you’d otherwise need to handleKeyError
Glad you found it helpful, and thank you for additions.