3 ms·
"also the fact that you need to check if dictionary key exists, else you get an exception when trying to get the keys value." dictionary.get(...) is specifical
by jbarberu 8y ago
"also the fact that you need to check if dictionary key exists, else you get an exception when trying to get the keys value."
dictionary.get(...) is specifically for avoiding the exception, you should just get None if the key doesn't exist. Unless I'm misunderstanding you and your complaint lies elsewhere.
Don't get me wrong, there are plenty of things that are stupid/annoying with python, this comment however reads more like "python is bad because I can't write perl in it". I think that's why people are flagging it.