[New-bugs-announce] [issue39054] Add an parameter to list.remove()
Lovi
report at bugs.python.org
Sun Dec 15 07:30:37 EST 2019
New submission from Lovi <1668151593 at qq.com>:
I think the list can add a parameter to remove():
remove(value, appear_time=1, /)
The parameter appear_time indicates the number of times the value appears in the list.
I want this effect:
>>> list1 = [1, 2, 3, 2, 1, 2, 1]
>>> list1.remove(2, 2)
>>> list1
[1, 2, 3, 1, 2, 1]
>>> list1.remove(1, 3)
>>> list1
[1, 2, 3, 1, 2]
----------
messages: 358420
nosy: lovi
priority: normal
severity: normal
status: open
title: Add an parameter to list.remove()
type: enhancement
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39054>
_______________________________________
More information about the New-bugs-announce
mailing list