class MyList ():
        def __init__(self, value):
                self.value = []
                for x in value:
                        self.value.append(x)
        def __add__(self , other):
                return MyList(self.value+other)
        def __mul__(self , other):
                return MyList(self.value*other)
        def __getitem__(self , item):   
                return MyList(self.value+item)
        def __len__(self ):
                return len(self.value)
        def __getlice__(self , low, high):
                return MyList(self.value[low:high]
        def append(self , other):
                self.list=self.list.append(other)
                return self.list 
        def __getattr__(self , name):
                return getattr(self.value, name)
        def __repr__(self  ):
                return 'self.value'
-- 
Grigor Kolev <grigor.ko...@gmail.com>

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to