This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lovi
Recipients lovi
Date 2019-12-15.12:30:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576413037.77.0.199193038416.issue39054@roundup.psfhosted.org>
In-reply-to
Content
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]
History
Date User Action Args
2019-12-15 12:30:37lovisetrecipients: + lovi
2019-12-15 12:30:37lovisetmessageid: <1576413037.77.0.199193038416.issue39054@roundup.psfhosted.org>
2019-12-15 12:30:37lovilinkissue39054 messages
2019-12-15 12:30:37lovicreate