Skip to content

Because frozenset.copy() doesn't copy the frozenset so frozenset.copy() is useless and should be deprecated and removed in the future. #139439

@hyperkai

Description

@hyperkai

Feature or enhancement

Proposal:

frozenset.copy() doesn't copy the frozenset to avoid wasting memory according to the post as shown below:

import copy

A = frozenset([0, 1, 2])

B = A.copy()

print(A is B)
# True

Now, because frozenset.copy() doesn't copy the frozenset so frozenset.copy() is useless and should be deprecated and removed in the future.

Others also think frozenset.copy() is useless according to the post.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions