On Mon, Dec 14, 2015 at 7:31 AM, Erik <pyt...@lucidity.plus.com> wrote: > On 13/12/15 20:28, Erik wrote: >> >> When you call "print", then the list class's __repr__() method is called >> which in turn calls the contained objects' __repr__() methods in turn > > > I mean the __str__() method, not __repr__() in this case - however, the > answer is otherwise the same.
It actually makes no difference; lists don't have __str__, and fall back on object.__str__, which returns self.__repr__(). Inside list.__repr__, the contained objects' reprs are combined. With lists, you always get the repr. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list