NotRoundtrippable#
- class penzai.treescope.copypaste_fallback.NotRoundtrippable[source]#
Bases:
object
A placeholder for a non-roundtrippable object in roundtrip mode.
Many objects can be round-trippably rendered by Treescope, but some do not support full round-tripping (e.g. JAX arrays or unrecognized PyTree leaves). For these objects, it is still sometimes convenient to render something that is valid Python and identifies the original object. This placeholder object serves that purpose.
- Variables:
Methods
__init__
(original_repr, original_id, ...)from_object
(obj[, repr_override])Constructs a NotRoundtrippable from an object.
Attributes
original_repr
original_id
original_type
- classmethod from_object(obj: Any, repr_override: str | None = None) NotRoundtrippable [source]#
Constructs a NotRoundtrippable from an object.