Skip to content

docs: explain parameter names that collide with accessor methods - #1242

Merged
philippjfr merged 1 commit into
holoviz:mainfrom
YashAnand69:docs/parameter-name-collisions-nov19
Nov 24, 2026
Merged

philippjfr merged 1 commit into
holoviz:mainfrom
YashAnand69:docs/parameter-name-collisions-nov19

Conversation

@YashAnand69

@YashAnand69 YashAnand69 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

In #1005, building a reactive expression from a Panel layout's objects parameter raises an AttributeError. The dot lookup returns the param.objects() method. The Parameters guide now warns about this collision, and the Reactive Expressions guide shows how bracket lookup keeps the expression attached to the parameter.

Fixes #1005

import panel as pn

layout = pn.Column()
is_empty = layout.param['objects'].rx.bool().rx.not_()
print(is_empty.rx.value)  # True
layout.append('item')
print(is_empty.rx.value)  # False

Replace layout.param['objects'] with layout.param.objects to reproduce the error. Local validation covered both Panel examples, the new Param notebook cell, class and instance lookup, and pre-commit on both notebooks.

Actual output from the dot and bracket lookup examples

Parameters guide · Reactive Expressions guide · Maintainer guidance

AI Disclosure

Tool & Model: OpenAI Codex (GPT-6.2 Sol)
Usage: Investigated the lookup, drafted and revised the guide text and example, and ran the reproduction and notebook checks above.

  • I have tested all AI-generated content in my PR.
  • I take responsibility for all AI-generated content in my PR.

Checklist

  • Added documentation

@philippjfr
philippjfr merged commit 401a699 into holoviz:main Nov 24, 2026
@philippjfr philippjfr mentioned this pull request Nov 24, 2026
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document how to use with layout.param.objects.rx

2 participants