Guido van Rossum added the comment: On Jan 31, 2008 2:54 PM, Michael Van Biesbrouck wrote: > Why do people want to use copy and deepcopy? I think that the issue is > that Python is an imperative language that passes and copies references. > If a library function doesn't treat its arguments as const, horrible > things could happen. Compounding this, several standard operations > (such as sort) operate in place, so if you want to use them then you > need to make shallow copies at the very least.
I see the point for shallow copies. I just don't see the point for deep copies. > When non-scalar types > nest, the whole structure can be deepcopied or copy can be used > repeatedly in a selective manner (with a high chance of bugs). I don't understand the use case. I still think this comes primarily from a lack of familiarity with how Python is typically used. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1515> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com