epydoc.markup.pyval_repr._ColorizerState

Package epydoc :: Package markup :: Module pyval_repr :: Class _ColorizerState |
[hide private]
[frames] | no frames]

# Class _ColorizerState

source code

An object uesd to keep track of the current state of the pyval colorizer. The mark()/restore() methods can be used to set a backup point, and restore back to that backup point. This is used by several colorization methods that first try colorizing their object on a single line (setting linebreakok=False); and then fall back on a multi-line output if that fails. The score variable is used to keep track of a 'score', reflecting how good we think this repr is. E.g., unhelpful values like '<Foo instance at 0x12345>' get low scores. If the score is too low, we'll use the parse-derived repr instead.

Instance Methods | [hide private]
__init__(self) | source code call graph
Call Graph
mark(self) | source code call graph
Call Graph
restore(self, mark) | source code call graph
Call Graph

Instance Variables | [hide private]
| score How good this represention is?