Re: Problem with __str__ if baseclass is list

2005-11-13 Thread Serge Orlov
Edward C. Jones wrote: > #! /usr/bin/env python > > class A(list): > def __init__(self, alist, n): > list.__init__(self, alist) > self.n = n > > def __str__(self): > return 'AS(%s, %i)' % (list.__str__(self), self.n) > > def __repr__(self): > retur

Problem with __str__ if baseclass is list

2005-11-12 Thread Edward C. Jones
#! /usr/bin/env python class A(list): def __init__(self, alist, n): list.__init__(self, alist) self.n = n def __str__(self): return 'AS(%s, %i)' % (list.__str__(self), self.n) def __repr__(self): return 'AR(%s, %i)' % (list.__repr__(self), self.