@freakboy3742 Sorry my brain got short-circuited just now 😅. Actually the reason I make a private __getitem__ on org.python.types.Dict is to preserve dict behavior on defaultdict. You see, other than __getitem__, defaultdict has exactly the same behavior as dict when other methods are call.
e.g. defaultdict.get(x) should return None (same as dict) when x is not a key instead of invoking the default_factory for missing value.
However the implementation of get(x) in voc calls __getitem__(x) which indirectly calls __missing__(x), causing defaultdict to return default_factory value instead of None, hence the need of another 'internal use' __getitem__ without calls to __missing__.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.