build_foldable_representation#
- penzai.treescope.default_renderer.build_foldable_representation(value: Any, ignore_exceptions: bool = False) RenderableAndLineAnnotations [source]#
Builds a foldable representation of an object using default configuration.
Uses the default renderer and expansion strategy.
- Parameters:
value – Value to render.
ignore_exceptions – Whether to catch errors during rendering of subtrees and show a fallback for those subtrees, instead of failing the entire renderer. Best used in contexts where
value_to_foldable_html
is not being called directly, e.g. when registering this as a default pretty-printer.
- Returns:
A text representation of the object.