python-frozendict icon indicating copy to clipboard operation
python-frozendict copied to clipboard

A copy with no arguments should return self

Open jruere opened this issue 10 years ago • 1 comments

Hi, it would be great to take advantage of the immutability of the type and return self instead of creating a new instance when no new fields are passed to copy.

jruere avatar Jun 15 '15 20:06 jruere

Regarding why, for compatibility with code using normal dicts that make a defensive copy.

On 07/08/16 02:20, Paweł Polewicz wrote:

Actually, no. You are correct. I should not write comments in the middle of the night.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/slezica/python-frozendict/issues/6#issuecomment-238054027, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPSxq2IabHP8FuvPmmjYNfN5iwFP2E8ks5qdRbHgaJpZM4FDv2M.

jruere avatar Aug 07 '16 05:08 jruere