Skip to content

gh-148542: docs: clarify call by value vs reference in Tutorial 4.8#148563

Open
dagangtj wants to merge 1 commit intopython:mainfrom
dagangtj:fix/issue-148542
Open

gh-148542: docs: clarify call by value vs reference in Tutorial 4.8#148563
dagangtj wants to merge 1 commit intopython:mainfrom
dagangtj:fix/issue-148542

Conversation

@dagangtj
Copy link
Copy Markdown

@dagangtj dagangtj commented Apr 14, 2026

Summary

Clarifies the explanation of argument passing in Tutorial Section 4.8 to reduce confusion about call by value vs reference.

Changes

  • Updated the description of how arguments are passed
  • Clarified that mutations to mutable objects are visible outside, while reassignments inside the function are not
  • Added a short example demonstrating the difference between mutation and reassignment
  • Removed the now-redundant footnote

Fixes #148542


📚 Documentation preview 📚: https://cpython-previews--148563.org.readthedocs.build/

@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Apr 14, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Apr 14, 2026
@StanFromIreland StanFromIreland changed the title docs: clarify call by value vs reference in Tutorial 4.8 gh-148542: docs: clarify call by value vs reference in Tutorial 4.8 Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Tutorial 4.8 call by value vs reference is confusing

1 participant