With the following code :
import types
class Foo():
def __getitem__(self, x):
return x
def new_get(self, x):
return x + 1
x = Foo()
x.__getite
This is unfortunately, and quite surprisingly, not allowed:
For custom classes, implicit invocations of special methods are only guaranteed to work correctly if defined on an object’s type, not in the object’s instance dictionary.
Source: https://docs.python.org/3/reference/datamodel.html#special-lookup