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-34524: Update comments for examples of format conversion #8964

Closed
wants to merge 1 commit into from

Conversation

rarevans
Copy link

@rarevans rarevans commented Aug 28, 2018

Updated the documentation section for format conversions. The example of conversion had comments that did not match the example. Small changes to wording for clarity.

https://bugs.python.org/issue34524

https://bugs.python.org/issue34524

@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 your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

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

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

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Aug 28, 2018
"More {!a}" # Calls ascii() on the argument first
"Harold's a clever {0!s}" # Calls str() on the first argument
"Bring out the holy {name!r}" # Calls repr() on a named argument
"More {!a}" # Calls ascii() on an implicit argument
Copy link
Member

Choose a reason for hiding this comment

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

The examples say "on the argument first", because it's trying to say that !a, !s, and !r are conversions that are called first. That is, they're called before the resulting string is formatted.

I agree that the comments aren't great, but I think any changes need to make this point about conversions being applied first, and your edits lose that. Maybe something like "Calls str() on the argument before formatting the resulting string"? I realize it's a little long.

Copy link
Author

Choose a reason for hiding this comment

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

Okay Eric, that is not how I read it when I encountered it. I can see what you mean about the original. This change is unnecessary then.

@rarevans rarevans closed this Aug 28, 2018
@rarevans rarevans deleted the format_conversion_doc branch November 2, 2018 01:17
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants