feat: Implement __replace__ method in BaseContainer for copy.replace(… · dry-python/returns@2fa9fda · GitHub
Skip to content

Commit 2fa9fda

Browse files
Adrian AcalaAdrian Acala
authored andcommitted
feat: Implement __replace__ method in BaseContainer for copy.replace() support
- Added the __replace__ magic method to BaseContainer, enabling the creation of modified copies of immutable containers in line with Python 3.13's copy.replace() functionality. - Updated documentation to include usage examples and clarify the behavior of the new method. - Added tests to ensure the correct functionality of the __replace__ method and its integration with the copy module. - Updated CHANGELOG to reflect this new feature and its implications for container usage. Closes #1920.
1 parent ac1bf89 commit 2fa9fda

4 files changed

Lines changed: 368 additions & 339 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 335 deletions

0 commit comments

Comments
 (0)