<s> """<STR_LIT>""" <EOL> class UserList : <EOL> def __init__ ( self , initlist = None ) : <EOL> self . data = [ ] <EOL> if initlist is not None : <EOL> if type ( initlist ) == type ( self . data ) : <EOL> self . data [ : ] = initlist <EOL> elif isinstance ( initlist , UserList ) : <EOL> self . data [ : ] = initlist . data [ : ] <EOL> else : <EOL> self . data = list ( initlist ) <EOL> def __repr__ ( self ) : return repr ( self . data ) <EOL> def __lt__ ( self , other ) : return self . data < self . __cast ( other ) <EOL> def __le__ ( self , other ) : return self . data <= self . __cast ( other ) <EOL> def __eq__ ( self , other ) : return self . data == self . __cast ( other ) <EOL> def __ne__ ( self , other ) : return self . data != self . __cast ( other ) <EOL> def __gt__ ( self , other ) : return self . data > self . __cast ( other ) <EOL> def __ge__ ( self , other ) : return self . data >= self . __cast ( other ) <EOL> def __cast ( self , other ) : <EOL> if isinstance ( other , UserList ) : return other . data <EOL> else : return other <EOL> def __cmp__ ( self , other ) : <EOL> return cmp ( self . data , self . __cast ( other ) ) <EOL> def __contains__ ( self , item ) : return item in self . data <EOL> def __len__ ( self ) : return len ( self . data ) <EOL> def __getitem__ ( self , i ) : return self . data [ i ] <EOL> def __setitem__ ( self , i , item ) : self . data [ i ] = item <EOL> def __delitem__ ( self , i ) : del self . data [ i ] <EOL> def __getslice__ ( self , i , j ) : <EOL> i = max ( i , <NUM_LIT:0> ) ; j = max ( j , <NUM_LIT:0> ) <EOL> return self . __class__ ( self . data [ i : j ] ) <EOL> def __setslice__ ( self , i , j , other ) : <EOL> i = max ( i , <NUM_LIT:0> ) ; j = max ( j , <NUM_LIT:0> ) <EOL> if isinstance ( other , UserList ) : <EOL> self . data [ i : j ] = other . data <EOL> elif isinstance ( other , type ( self . data ) ) : <EOL> self . data [ i : j ] = other <EOL> else : <EOL> self . data [ i : j ] = list ( other ) <EOL> def __delslice__ ( self , i , j ) : <EOL> i = max ( i , <NUM_LIT:0> ) ; j = max ( j , <NUM_LIT:0> ) <EOL> del self . data [ i : j ] <EOL> def __add__ ( self , other ) : <EOL> if isinstance ( other , UserList ) : <EOL> return self . __class__ ( self . data + other . data ) <EOL> elif isinstance ( other , type ( self . data ) ) : <EOL> return self . __class__ ( self . data + other ) <EOL> else : <EOL> return self . __class__ ( self . data + list ( other ) ) <EOL> def __radd__ ( self , other ) : <EOL> if isinstance ( other , UserList ) : <EOL> return self . __class__ ( other . data + self . data ) <EOL> elif isinstance ( other , type ( self . data ) ) : <EOL> return self . __class__ ( other + self . data ) <EOL> else : <EOL> return self . __class__ ( list ( other ) + self . data ) <EOL> def __iadd__ ( self , other ) : <EOL> if isinstance ( other , UserList ) : <EOL> self . data += other . data <EOL> elif isinstance ( other , type ( self . data ) ) : <EOL> self . data += other <EOL> else : <EOL> self . data += list ( other ) <EOL> return self <EOL> def __mul__ ( self , n ) : <EOL> return self . __class__ ( self . data * n ) <EOL> __rmul__ = __mul__ <EOL> def __imul__ ( self , n ) : <EOL> self . data *= n <EOL> return self <EOL> def append ( self , item ) : self . data . append ( item ) <EOL> def insert ( self , i , item ) : self . data . insert ( i , item ) <EOL> def pop ( self , i = - <NUM_LIT:1> ) : return self . data . pop ( i ) <EOL> def remove ( self , item ) : self . data . remove ( item ) <EOL> def count ( self , item ) : return self . data . count ( item ) <EOL> def index ( self , item , * args ) : return self . data . index ( item , * args ) <EOL> def reverse ( self ) : self . data . reverse ( ) <EOL> def sort ( self , * args , ** kwds ) : self . data . sort ( * args , ** kwds ) <EOL> def extend ( self , other ) : <EOL> if isinstance ( other , UserList ) : <EOL> self . data . extend ( other . data ) <EOL> else : <EOL> self . data . extend ( other ) </s>
