Values shown by Epydoc may have a better visualization than repr()
This item must not stop v3.0 to be released. Things like "how to best represent a list of dicts" may be taken into account later. But, please, no more <wtf instance at 0xABCD> :)
Here is a list of ideas bounced between edloper and me:
> - repr() is fine only for int and for classes that specifically return a parsable representation, such as datetime. Even floats (such as 0.1) often have an ugly representation.
Yeah -- people are very inconsistent about how they use repr/str.
> - fall back on the parsed version if available and the repr() result matches an ugly pattern looks like "<something>"?
Sometimes the parsed version isn't very trustworthy.. E.g., if they create a variable with a list, and then append to it, etc. But you may be right that this may be the best way to go when you get "<something>". It's almost certainly the best way if you get "<xyz instance at 0xaddr>".
> - fall back on str()ingification?
Yeah, it might be good to use str() for some values.
> - prettyprinting of lists, dicts etc? More clever truncation of long representations?
Seems like good ideas.
One issue/question is that right now a good amount of this is handled in specific docwriter modules.. E.g., the docwriter.html code to colorize regexps. Should this be abstracted away somehow and handled more centrally? E.g., the centralized code could generate an abstract structure saying how to color the regexp, and the individual writers would just translate that to the appropriate markup?