Bizarre floating-point output

Ziga Seilnacht ziga.seilnacht at gmail.com
Mon Jan 8 12:36:38 EST 2007


Nick Maclaren wrote:

> I think that you should.  Where does it say that tuple's __str__ is
> the same as its __repr__?
>
> The obvious interpretation of the documentation is that a sequence
> type's __str__ would call __str__ on each sub-object, and its __repr__
> would call __repr__.

How would you distinguish ['3', '2', '1'] from [3, 2, 1] in that case?

Ziga




More information about the Python-list mailing list