[Python-3000] PEP 3138- String representation in Python 3000
Nick Coghlan
ncoghlan at gmail.com
Wed May 28 01:17:36 CEST 2008
Jim Jewett wrote:
> So I suggest that he or she use str, rather than repr -- and that we
> fix containers to make this possible.
And hope that every other author of a Python container class on the
planet does the same thing?
Recursing downwards with str() instead of repr() will break as soon as
it encounters a container class which either doesn't resurce with str()
or doesn't propagate a new "this is really str()" flag (depending on how
Oleg's PEP suggests implementing this).
PEP 3138 fixes the problem without relying on third parties to do anything.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list