Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add replace to copy.__all__
  • Loading branch information
max-muoto committed Jul 3, 2024
commit 32890062181df1f344483d67da9abccad23b576d
2 changes: 1 addition & 1 deletion Lib/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Error(Exception):
pass
error = Error # backward compatibility

__all__ = ["Error", "copy", "deepcopy"]
__all__ = ["Error", "copy", "deepcopy", "replace"]

@pygeek pygeek Jul 3, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a regression test so this doesn't happen again. See helper method support.test__all__ in the test directory—it automatically detects public methods based on whether they follow the public name convention.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, let me go ahead, good callout.


def copy(x):
"""Shallow copy operation on arbitrary Python objects.
Expand Down