Skip to content

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

Merged
merged 6 commits into from
Feb 25, 2024
Merged

Conversation

osmin625
Copy link
Contributor

@osmin625 osmin625 commented Dec 5, 2023

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/

@ghost
Copy link

ghost commented Dec 5, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Dec 5, 2023
@terryjreedy terryjreedy changed the title Add an example of repr Add an example of of custom __repr__ Feb 25, 2024
@terryjreedy
Copy link
Member

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.

@osmin625
Copy link
Contributor Author

@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.
Thank you for leaving a comment on this pr.

@terryjreedy terryjreedy merged commit 5770006 into python:main Feb 25, 2024
@miss-islington-app
Copy link

Thanks @osmin625 for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 25, 2024
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>
@bedevere-app
Copy link

bedevere-app bot commented Feb 25, 2024

GH-115900 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Feb 25, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 25, 2024
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>
@bedevere-app
Copy link

bedevere-app bot commented Feb 25, 2024

GH-115901 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Feb 25, 2024
terryjreedy added a commit that referenced this pull request Feb 25, 2024
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>
terryjreedy added a commit that referenced this pull request Feb 25, 2024
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>
@terryjreedy
Copy link
Member

Both backports merged.

woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
Added to repr entry in Doc/library/functions.rst.

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Added to repr entry in Doc/library/functions.rst.

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
Added to repr entry in Doc/library/functions.rst.

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants