pydoc_fork

pydoc_fork.reporter.html_repr_class

 

Class for safely making an HTML representation of a Python object.

Modules

`from` Modules

Classes

reprlib.Repr(builtins.object)
HTMLRepr(reprlib.Repr)
HTMLRepr() -> None
 
Class for safely making an HTML representation of a Python object.
 
Method resolution order:
HTMLRepr
reprlib.Repr
builtins.object

Methods defined here:
__init__(self) -> None
Some maximums
repr(self, x: Any) -> str
Delegates to Repr.repr
repr1(self, x: Any, level: int) -> str
Not sure, is dead code?
repr_instance(self, x: Any, level: int) -> str
Repr, but squash it into a window
repr_str(self, x: str, level: int) -> str
Match reprlib's hook name for strings.
repr_string(self, x: str, _: int) -> str
Repr, but squash it into a window
repr_unicode(self, x: str, level: int) -> str
Compatibility alias for older reprlib integrations.

Static methods defined here:
escape(text: str) -> str
Simple html escaping

Data and other attributes defined here:
__firstlineno__ = 11
__static_attributes__ = ('maximum_dict', 'maximum_list', 'maximum_other', 'maximum_string', 'maximum_tuple')

Methods inherited from reprlib.Repr:
repr_array(self, x, level)
repr_deque(self, x, level)
repr_dict(self, x, level)
repr_frozenset(self, x, level)
repr_int(self, x, level)
repr_list(self, x, level)
repr_set(self, x, level)
repr_tuple(self, x, level)

Functions

cast(typ, val)
Cast a value to a type.
 
This returns the value unchanged.  To the type checker this
signals that the return value has the designated type, but at
runtime we intentionally don't check anything (we want this
to be as fast as possible).
cram(text: str, maximum_length: int) -> str
Omit part of a string if needed to make it fit in a maximum length.
replace(text: str, *pairs: str) -> str
Do a series of global replacements on a string.
>>> replace("abc xyz", "xyz", "abc")
'abc abc'
stripid(text: str) -> str
Remove the hexadecimal id from a Python object representation.