[Python-3000] Recursive str
Jim Jewett
jimjjewett at gmail.com
Thu Apr 17 16:13:14 CEST 2008
I think asking every container type to implement str just to ensure
its subobjects are printed correctly is a losing proposition.
It might be possible for repr to take an extra keyword argument
indicating that it is being used in place of string. Then, when it
recurses on subobjects, it should call str instead of repr when this
argument is passed. (And the top-level delegation should of course
pass this argument when changing str to repr.)
-jJ
More information about the Python-3000
mailing list