class MyRange: def __init__( self, start, stop, step ): self.sequence = range( start, stop, step ) def __getitem__( self, subscript ): return self.sequence[ subscript ]