Uses py3 collections.UserDict if possible