typetesting, adaptation, typeclasses, ... (was Re: isinstance() considered harmful)
Jason Orendorff
jason at jorendorff.com
Sun Jan 27 13:53:31 EST 2002
> In MetaPy.Sugar.Sequence, I define everything in terms of
> simple_getitem, simple_setitem, simple_delitem, insert, and __len__.
> [...]
> append is defined in terms of extend [...]
Wouldn't this be better?
def append(self, obj):
self.insert(self.__len__(), obj)
## Jason Orendorff http://www.jorendorff.com/
More information about the Python-list
mailing list