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

bpo-47007: [doc] str special method lookup #31863

Merged
merged 5 commits into from
Apr 5, 2022
Merged

Conversation

itsvs
Copy link
Contributor

@itsvs itsvs commented Mar 14, 2022

Adds a note to the str() docs pointing out that object.__str__() follows special method lookup.

https://bugs.python.org/issue47007

https://bugs.python.org/issue47007

Adds a note to the `str()` docs pointing out that `object.__str__()`
follows special method lookup.
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@itsvs

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@JelleZijlstra
Copy link
Member

This seems excessively long to me. I'd prefer just saying type(object).__str__(object), as the bug suggested.

@JelleZijlstra JelleZijlstra self-assigned this Mar 28, 2022
@itsvs
Copy link
Contributor Author

itsvs commented Mar 28, 2022

sure, changed to just type(object).__str__(object) (do these docs prefer the 80-character cutoff? i didn't reformat)

@JelleZijlstra JelleZijlstra merged commit bb86d1d into python:main Apr 5, 2022
@miss-islington
Copy link
Contributor

Thanks @itsvs for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-32318 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Apr 5, 2022
@bedevere-bot
Copy link

GH-32319 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Apr 5, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 5, 2022
Clarify the `str()` docs to point out that `object.__str__()`
follows special method lookup.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit bb86d1d)

Co-authored-by: Vanshaj Singhania <8797467+itsvs@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Apr 5, 2022
Clarify the `str()` docs to point out that `object.__str__()`
follows special method lookup.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit bb86d1d)

Co-authored-by: Vanshaj Singhania <8797467+itsvs@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Apr 5, 2022
Clarify the `str()` docs to point out that `object.__str__()`
follows special method lookup.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit bb86d1d)

Co-authored-by: Vanshaj Singhania <8797467+itsvs@users.noreply.github.com>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
Clarify the `str()` docs to point out that `object.__str__()`
follows special method lookup.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit bb86d1d)

Co-authored-by: Vanshaj Singhania <8797467+itsvs@users.noreply.github.com>
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 news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants