[Python-Dev] Dict __missing__ consistency issues.

2020-01-08 Thread Bar Harel
Hey guys, I was just about to fix dict's get() to call __missing__ if a key doesn't exist (before returning the default value) but realized that although small, that patch can cause future issues. Right now there's an inconsistency: >>> from collections import UserDict >>> class A(dict): ... d

[Python-Dev] Dict __missing__ consistency issues

2020-01-08 Thread Bar Harel
Hey guys, I was just about to fix dict's get() to call __missing__ if a key doesn't exist (before returning the default value) but realized that although small, that patch can cause future issues. Right now there's an inconsistency: >>> from collections import UserDict >>> class A(dict): ... def