From 9a579f6afe00a8ae684e7903992cd2119120812d Mon Sep 17 00:00:00 2001 From: Coderambling <159031875+Coderambling@users.noreply.github.com> Date: Fri, 3 Jul 2026 12:40:24 +0200 Subject: [PATCH] Added text to script_repr docstring to mention script_repr_suppress_defaults Added mention of suppress flag(or config variable?) to script_repr docstring for awareness, completeness and clarification. By default, script_repr prints only parameter values that have changed from their defaults; for the complete set of parameter values, including all defaults, first run: param.parameterized.script_repr_suppress_defaults=False For more details on this, see: https://param.holoviz.org/en/docs/latest/user_guide/Serialization_and_Persistence.html#script-repr-limitations-and-workarounds --- param/parameterized.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/param/parameterized.py b/param/parameterized.py index 2e2444b3..85def595 100644 --- a/param/parameterized.py +++ b/param/parameterized.py @@ -5172,6 +5172,15 @@ def script_repr( configuration. It captures only the state of the object's parameters, not its internal (non-parameter) attributes. + By default, script_repr prints only parameter values that have changed from + their defaults; for the complete set of parameter values, including + all defaults, first run: + + param.parameterized.script_repr_suppress_defaults=False + + For more details on this, see: + https://param.holoviz.org/en/docs/latest/user_guide/Serialization_and_Persistence.html#script-repr-limitations-and-workarounds + Parameters ---------- val : Parameterized @@ -5215,7 +5224,6 @@ def script_repr( References ---------- See https://param.holoviz.org/user_guide/Serialization_and_Persistence.html#script-repr. - Examples -------- Create a Python script representation of a Parameterized object: