Issue 29749: Outdated int() docstring (original) (raw)

Created on 2017-03-07 13:44 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 565 merged python-dev,2017-03-08 18:01
Messages (6)
msg289163 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-07 13:44
bpo-29695 removed "bad keyword parameters in int(), bool(), float(), list() and tuple()", but int docstring (at least) is now outdated: haypo@selma$ ./python Python 3.7.0a0 (master:8f6b344d368c15c3fe56c65c2f2776e7766fef55, Mar 7 >>> help(int) class int(object) | int(x=0) -> integer int(x, base=10) -> integer ... >>> int(x=0) TypeError: 'x' is an invalid keyword argument for this function
msg289246 - (view) Author: svelankar (svelankar) * Date: 2017-03-08 16:51
int docstring is the only one that needs to be changed. docstrings for float,tuple and list look fine to me.
msg289251 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-08 18:20
int() can be called without argument.
msg289252 - (view) Author: svelankar (svelankar) * Date: 2017-03-08 18:33
True, but the docstring says "return 0 if no arguments are given". So please let me know, if you want me to still change it i.e. add int() or keep it as it is. Thanks.
msg289255 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-03-08 20:17
After converting int.__new__() to Argument Clinic this issue will become outdated.
msg290258 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-24 22:40
New changeset 390a0969c1206a37c86961ebf7ef3050681ed8dd by Brett Cannon (svelankar) in branch 'master': bpo-29749: Update int() docstring (GH-565) https://github.com/python/cpython/commit/390a0969c1206a37c86961ebf7ef3050681ed8dd
History
Date User Action Args
2022-04-11 14:58:43 admin set github: 73935
2017-03-24 22:40:12 brett.cannon set messages: +
2017-03-09 00:29:32 brett.cannon set status: open -> closedresolution: fixedstage: resolved
2017-03-08 20:17:47 serhiy.storchaka set messages: +
2017-03-08 19:03:48 serhiy.storchaka set nosy: + brett.cannon
2017-03-08 18:33:31 svelankar set messages: +
2017-03-08 18:20:26 serhiy.storchaka set messages: +
2017-03-08 18:01:21 python-dev set pull_requests: + <pull%5Frequest464>
2017-03-08 16:51:10 svelankar set nosy: + svelankarmessages: +
2017-03-07 13:44:49 vstinner create