We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The __index__ method

__index__(self)

Called to implement operator.index. Also called whenever Python needs an integer object (such as in slicing). Must return an integer (int or long). New in version 2.5.