def __getitem__(self, y):
        """
        x.__getitem__(y) <==> x[y]

        Warning: a bug in Python 2.x prevents indexing via a slice from
        returning a newlist object.
        """
        if isinstance(y, slice):
            return newlist(super(newlist, self).__getitem__(y))
        else:
            return super(newlist, self).__getitem__(y)
def __getitem__ ( self , y ) : if isinstance ( y , slice ) : return newlist ( super ( newlist , self ) . __getitem__ ( y ) ) else : return super ( newlist , self ) . __getitem__ ( y )
x.__getitem__(y) <==> x[y]

        Warning: a bug in Python 2.x prevents indexing via a slice from
        returning a newlist object.