Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-22702: Improves documentation for str.join method#156

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

CuriousLearner
Copy link
Member

@the-knights-who-say-ni

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 thePSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow these steps to rectify the issue:

  1. Sign thePSF contributor agreement
  2. Wait at least one US business day and then check "Your Details" onbugs.python.org to see if your account has been marked as having signed the CLA (the delay is due to a person having to manually check your signed CLA)
  3. Reply here saying you have completed the above steps

Thanks again to your contribution and we look forward to looking at it!

@serhiy-storchakaserhiy-storchaka added the docsDocumentation in the Doc dir labelFeb 18, 2017
@DimitrisJim
Copy link
Contributor

Hi@CuriousLearner! The original text seems fine to me, why do you think this change is warranted?

@CuriousLearner
Copy link
MemberAuthor

Hi@DimitrisJim !

As in the issue Raymond & others mentioned that at least the usage of repeatediterable word should be removed. Moreover, in general to make the docstring less verbose, this change is suggested.

Is there something else wanted in this PR?

@DimitrisJim
Copy link
Contributor

DimitrisJim commentedFeb 18, 2017
edited
Loading

Yes the double use of iterable is odd here, my view is that that is the only thing needing change.

My main issue is that the sentence "separated by the stringstr provided in this method" seems more confusing than the original sentence.

ncoghlan reacted with thumbs up emoji

@CuriousLearner
Copy link
MemberAuthor

Sure, I've done the changes as suggested.

@CuriousLearner
Copy link
MemberAuthor

CLA is signed and now visible in my account.

cc@ncoghlan

:term:`iterable` *iterable*. A :exc:`TypeError` will be raised if there are
any non-string values in *iterable*, including :class:`bytes` objects. The
separator between elements is the string providing this method.
:term:`iterable`. A :exc:`TypeError` will be raised if there are
Copy link
Member

Choose a reason for hiding this comment

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

IMHO *iterable* should be left, referring the parameter.

@wm75
Copy link

wm75 commentedMar 1, 2017

I don't think anything should be changed here. The double iterable is much less disturbing when formatted as html.

Copy link
Contributor

@marco-buttumarco-buttu left a comment
edited
Loading

Choose a reason for hiding this comment

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

IMO it should be just "initerable " and not "in the :term:iterable, as it is in the rest of the file when referring to the parameteriterable. Furthermore, you should apply the same modification to thebytearray.join() description, and add a second whitespace after the dot, before "A :exc:TypeError.

@ncoghlan
Copy link
Contributor

@CuriousLearner Sorry for the delayed review, but I'm inclined to agree with@marco-buttu here - the iterable to drop is the term reference, rather than the parameter name.

Seehttp://bugs.python.org/issue22702#msg291366 for further discussion.

@CuriousLearner
Copy link
MemberAuthor

Hi@marco-buttu &@ncoghlan !

I've made the changes according to earlier review. Please review :)

Copy link
Contributor

@marco-buttumarco-buttu left a comment

Choose a reason for hiding this comment

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

Just a minor change. The rest LGTM.

separator between elements is the string providing this method.
Return a string which is the concatenation of the strings in *iterable*.
A :exc:`TypeError` will be raised if there are any non-string values in
*iterable*, including :class:`bytes` objects. The separator between
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add an extra whitespace after the period? I mean, two whitespaces betweenobjects. andThe separator.

@CuriousLearner
Copy link
MemberAuthor

Hi@marco-buttu ! I've updated the patch. Can you please take a look?

Copy link
Contributor

@marco-buttumarco-buttu left a comment

Choose a reason for hiding this comment

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

Thank you, ok to me :-)

that are not :term:`bytes-like objects <bytes-like object>`, including
:class:`str` objects. The separator between elements is the contents
of the bytes or bytearray object providing this method.
binary data sequences in the *iterable*. A :exc:`TypeError` will be
Copy link
Member

Choose a reason for hiding this comment

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

You dropped "the" before *iterable* in str.join() documentation, but kept it here. Is there a reason to keep it here?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@berkerpeksag I don't remember any specific reason for that. Should I includethe instr.join() documentation?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not a native speaker so I'll defer the decision to@ncoghlan :)

Copy link
Contributor

Choose a reason for hiding this comment

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

We want to drop it - "iterable" refers specifically to the method parameter rather than the general term, so it doesn't need "the" in front of it.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@ncoghlan@berkerpeksag I've fixed it.

Is there something else needed for this PR?

@ncoghlan
Copy link
Contributor

Added the sprint label, as this PR was submitted at the PyCon Pune 2017 core development sprint.

Mariatta pushed a commit to Mariatta/cpython that referenced this pull requestJun 1, 2017
…onGH-156)The "iterable iterable" phrasing created confusion between the termreference and the parameter name.This simplifies the phrasing to just use the parameter namewithout linking directly to the term definition.(cherry picked from commit08e2f35)
Mariatta pushed a commit to Mariatta/cpython that referenced this pull requestJun 1, 2017
…onGH-156)The "iterable iterable" phrasing created confusion between the termreference and the parameter name.This simplifies the phrasing to just use the parameter namewithout linking directly to the term definition.(cherry picked from commit08e2f35)
Mariatta pushed a commit to Mariatta/cpython that referenced this pull requestJun 1, 2017
…onGH-156)The "iterable iterable" phrasing created confusion between the termreference and the parameter name.This simplifies the phrasing to just use the parameter namewithout linking directly to the term definition..(cherry picked from commit08e2f35)
Mariatta added a commit that referenced this pull requestJun 1, 2017
…H-1896)The "iterable iterable" phrasing created confusion between the termreference and the parameter name.This simplifies the phrasing to just use the parameter namewithout linking directly to the term definition.(cherry picked from commit08e2f35)
Mariatta added a commit that referenced this pull requestJun 1, 2017
…H-1897)The "iterable iterable" phrasing created confusion between the termreference and the parameter name.This simplifies the phrasing to just use the parameter namewithout linking directly to the term definition.(cherry picked from commit08e2f35)
Mariatta added a commit that referenced this pull requestJun 1, 2017
…H-1898)The "iterable iterable" phrasing created confusion between the termreference and the parameter name.This simplifies the phrasing to just use the parameter namewithout linking directly to the term definition..(cherry picked from commit08e2f35)
akruis pushed a commit to akruis/cpython that referenced this pull requestAug 16, 2018
…arningSince merging commit c1c47c1, the Stackless test casetest_shutdown.TestShutdown.test_kill_modifies_slp_cstack_chain emits thewarning: "gc:0: ResourceWarning: gc: 1 uncollectable objects atshutdown; use gc.set_debug(gc.DEBUG_UNCOLLECTABLE) to list them".This commit disables GC for this test.
jaraco pushed a commit that referenced this pull requestDec 2, 2022
Use pre-existing info instead of making another API call.python/miss-islington#153
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@berkerpeksagberkerpeksagberkerpeksag left review comments

@ncoghlanncoghlanncoghlan left review comments

@zhangyangyuzhangyangyuzhangyangyu left review comments

@marco-buttumarco-buttumarco-buttu approved these changes

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirsprint
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

10 participants
@CuriousLearner@the-knights-who-say-ni@DimitrisJim@wm75@ncoghlan@berkerpeksag@zhangyangyu@marco-buttu@serhiy-storchaka@Mariatta

[8]ページ先頭

©2009-2025 Movatter.jp