[New-bugs-announce] [issue29695] Weird keyword parameter names in builtins

Serhiy Storchaka report at bugs.python.org
Thu Mar 2 09:54:04 EST 2017


New submission from Serhiy Storchaka:

Proposed patches deprecate the "x" keyword parameter in int(), bool() and float() and the "sequence" keyword parameter in list() and tuple(). Name "x" is meaningless, and name "sequence" is misleading (any iterable is accepted, not just sequence). The documentation uses name "iterable" for list() and tuple().

It is never documented that any of these parameters are accepted by keywords. There was only a test for int(), but it was added just for increasing coverity, not to test intended behavior. Does this mean that the support of keyword arguments can be removed without deprecation?

The general idea got preliminary approval from Guido (https://mail.python.org/pipermail/python-ideas/2017-March/044959.html).

----------
components: Interpreter Core
files: deprecate-keyword-x.patch
keywords: patch
messages: 288802
nosy: gvanrossum, haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Weird keyword parameter names in builtins
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46684/deprecate-keyword-x.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29695>
_______________________________________


More information about the New-bugs-announce mailing list