[Epydoc-devel] value representation: parsed vs. introspected
Brought to you by:
edloper
From: Paul P. <pog...@gm...> - 2007-02-28 21:32:55
|
Edward Loper wrote (in the SF bug tracker): > The behavior Daniele described is actually the intended behavior: epydoc > currently uses a heuristic scoring function to decide on the trade-off > between when to use the parsed vs introspected repr. See > epydoc.markup.pyval_repr for more info on it, but basically the score gets > -5 for things like <this at 0x123>, but gets +1 for each item it processes > in a pretty-printed way. So for something like: > > [1, 'x', 2, 3, 4, 5, <this at 0x123>] > > epydoc will use the introspected repr even though it has an "ugly" value. > > > Perhaps this scoring function needs to be adjusted? If you think so, > bring it up on epy...@li... Well, without much thinking, I'd suggest that if parsed and repr() representations are equal, then don't award +1 bonus. And maybe add special cases for strings, like "/' dichotomy etc. No idea if that is difficult to implement. Paul |