Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document methods that return (supposedly) read-only references. #20

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

LTLA
Copy link
Member

@LTLA LTLA commented Oct 27, 2024

Closes #18.

It's impossible to actually enforce this, but at least it's documented
somewhere. We only do this for our custom methods that expose class members;
any behavior that mimics Python's inbuilt methods (e.g., returning a mutable
reference from NamedList.__getitem__) is assumed knowledge for the user.
@LTLA LTLA requested a review from jkanche October 27, 2024 18:30
Copy link
Member

@jkanche jkanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jkanche jkanche merged commit 277bab3 into master Oct 28, 2024
7 checks passed
@jkanche jkanche deleted the read-only-doc branch October 28, 2024 20:22
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.

Should return copy of internal list in Names object
2 participants