by zallarak · 11y ago · 0 comments
This is why after working on large apps in Ruby and Python, I strongly prefer Python. Accessing a non-existent key in a Ruby dictionary returns nil, whereas in Python a KeyError exception is thrown.
If you store nil in a Ruby dictionary, then you can't test for membership unless you use hash.fetch.