See PEP 357: Allowing Any Object to be Used for Slicing.
The
nb_int
method is used for coercion and so means something
fundamentally different than what is requested here. This PEP
proposes a method for something that can already be thought of as
an integer communicate that information to Python when it needs an
integer. The biggest example of why usingnb_int
would be a bad
thing is that float objects already define thenb_int
method, but
float objects should not be used as indexes in a sequence.
Edit: It seems that it was implemented in Python 2.5.