-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Add an example of of custom __repr__
#112761
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
Conversation
__repr__
Examples in this chapter are generally just a few lines. Readers should experiment with usage, but the basic ideas should be in the tutorial. Anyway, I am willing to merge this much. |
@terryjreedy I actually added a minor example to gain experience contributing to open source as a Python-loving student. I would be thrilled if that commit was added, but I understand it's such a minor example that we don't have to add. |
Thanks @osmin625 for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Added to repr entry in Doc/library/functions.rst. --------- (cherry picked from commit 5770006) Co-authored-by: Oh seungmin <tmdals179@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
GH-115900 is a backport of this pull request to the 3.12 branch. |
Added to repr entry in Doc/library/functions.rst. --------- (cherry picked from commit 5770006) Co-authored-by: Oh seungmin <tmdals179@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
GH-115901 is a backport of this pull request to the 3.11 branch. |
Both backports merged. |
Added to repr entry in Doc/library/functions.rst. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Added to repr entry in Doc/library/functions.rst. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Added to repr entry in Doc/library/functions.rst. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
I add an example to the document to make it easier for beginners to understand the repr function.
📚 Documentation preview 📚: https://cpython-previews--112761.org.readthedocs.build/