js wrote: > That's make sence, but it's also true that > sometimes we want to see the contents of a list in pretty format.
That may be true, but most of the time not (at least not me) -- lists are no pretty printing instrument, but a container. > So for now I need to write and use crappy mylist like this. > > class mylist(list): > def __str__(self): > return '[' + ', '.join(self) + ']' > > l = mylist([u"äöü", u"äöü", u"äöü"]) > print unicode(l) > > > very ugly, but just works. What's wrong with print ",".join(mylist) ? Also, the your solution isn't really "ugly" in my opinion. Regards, Björn -- BOFH excuse #55: Plumber mistook routing panel for decorative wall fixture -- http://mail.python.org/mailman/listinfo/python-list