bpo-29749: Outdated int docstring #565

Merged
merged 2 commits into from Mar 9, 2017

Projects

None yet

5 participants

Contributor

int docstring is the only one that needs to be changed. docstrings for float,tuple and list look fine to me.
Please review.

@svelankar svelankar Issue #29749:Outdated int() docstring
fcc95da

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 is necessary for legal reasons before we can look at your contribution. Please follow these steps to help rectify the issue:

  1. If you don't have an account on b.p.o, please create one
  2. Make sure your GitHub username is listed in "Your Details" at b.p.o
  3. If you have not already done so, please sign the PSF contributor agreement. The "bugs.python.org username " requested by the form is the "Login name" field under "Your Details".
  4. If you just signed the CLA, please wait at least one US business day and then check "Your Details" on bugs.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)
  5. Reply here saying you have completed the above steps

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

@svelankar, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mdickinson, @serhiy-storchaka, @tim-one, @brettcannon and @benjaminp to be potential reviewers.

@svelankar svelankar closed this Mar 8, 2017
@svelankar svelankar reopened this Mar 8, 2017
Owner

The docstring is actually correct:

>>> int()
0

So closing this.

@brettcannon brettcannon closed this Mar 8, 2017
Member

The docstring has the x parameter as a keyword which is no longer correct, and that is what the PR is fixing.

@bitdancer bitdancer reopened this Mar 8, 2017
Owner

@bitdancer but it also dropped the default arg, so shouldn't it be int([x]) to show that the x argument is positional-only while being optional?

@svelankar svelankar changed the title from bpo-29749: Outdated int() docstring to bpo-29749: Outdated int docstring Mar 8, 2017
Contributor

"or return 0 if no arguments are given" - This is from the docstring. Wouldn't this suffice to indicate that the positional argument is optional ?

Owner

@svelankar no because if you are quickly glancing at the docstring just for the signature to e.g. remember argument orders and such then you won't bother reading the whole docstring.

Contributor

Ok. Please let me know if int([x]) is the only change you would like to see.

Owner

Nope, I think that minor change is all that's necessary.

Owner

Oh, and please sign the CLA.

@svelankar svelankar Issue #29749:Outdated int docstring
b4c18c4
Contributor

Done.

@brettcannon brettcannon merged commit 390a096 into python:master Mar 9, 2017

3 checks passed

codecov/patch Coverage not affected when comparing a7cba27...b4c18c4
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Owner

Thanks for all the work on this, @svelankar !

Contributor

Thanks for the opportunity. Hope to make many more non trivial contributions in the future. Its nice to be part of this community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment