oleg broytmann otdphdppru thu apr 17 2008 013654pm 1200 greg ewing wrote oleg broytmann wrote understand right strobjects calls repr items properly quote strings str1 1 must give 1 1 result reason case strings yes generally kind object list reprx likely give unambiguous idea x strx embedded comma separated list use strcontainer instead reprcomtainer python need guess want unambiguous representation printable representation items dont think room guessing explicitly said str python way guessing appropriate way display list objects use str doesnt try doesnt need guess objects except strings __str__ call tell writing code want well found root problem pythons builtin containers list tuple dict set implement __repr__ __str__ course __repr__ calls repr items correct behaviour current implementation goes like class object def __str__self case derived class doesnt implement return reprself class listobject def __repr__self pieces item self piecesappendrepritem return joinpieces id like see __str__ implemented following way def __str__self pieces item self isinstanceitem str piecesappends item else piecesappendstritem return joinpieces oleg oleg broytmann httpphdppru otdphdppru programmers dont die gosub without return _______________________________________________ python3000 mailing list smsbmo9552pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000python300040tangomucom thu 07 aug 2008 231204 0400 python3000 recursive str