-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Labels
type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Rationale:
Currently there's no straightforward way to remove duplicates while preserving order. Common solutions like list(dict.fromkeys(lst))
or using sets are either non-intuitive or don't preserve order.
Proposed API:
lst = [1, 2, 2, 3, 1]
lst.remove_duplicates() # returns [1, 2, 3]
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discusions elsewhere.
Metadata
Metadata
Assignees
Labels
type-featureA feature request or enhancementA feature request or enhancement