returns icon indicating copy to clipboard operation
returns copied to clipboard

Add __replace__ magic method to BaseContainer for copy.replace() support

Open AdrianAcala opened this issue 10 months ago • 2 comments

  • Implemented the replace method in BaseContainer to allow for the creation of new container instances with modified internal values, in line with the copy.replace() function introduced in Python 3.13.
  • Updated documentation to reflect this new feature and provided usage examples.
  • Added tests to ensure the correct functionality of the replace method and its integration with the copy module.

I have made things!

Checklist

  • [x] I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
  • [x] I have created at least one test case for the changes I have made
  • [x] I have updated the documentation for the changes I have made
  • [x] I have added my changes to the CHANGELOG.md

Related issues

  • Closes #1920

🙏 Please, if you or your company finds dry-python valuable, help us sustain the project by sponsoring it transparently on https://github.com/sponsors/dry-python. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.

AdrianAcala avatar Apr 02 '25 00:04 AdrianAcala

@sobolevn , sorry about the delay. My family got sick and then I got sick and then work has been busy since I missed some time. I went through this again and resolved what I think is what you want. Please review again please.

AdrianAcala avatar Apr 14 '25 19:04 AdrianAcala

@sobolevn , this is ready for your review. Thanks so much!

AdrianAcala avatar Apr 19 '25 22:04 AdrianAcala