A small suggestion for Python
Fredrik Lundh
fredrik at effbot.org
Tue Jan 16 13:46:11 EST 2001
ssthapa at harper.uchicago.edu wrote:
> Also there are times when making copies is not possible or would be
> the wrong thing to do. For example if the array contains objects representing
> email messages which you sort based on time. Copying the emails may not be
> pratical especially if they contain large attachments.
copy.copy(L) (and L[:]) does a shallow copy. it only copies
the pointers, not the members.
Cheers /F
More information about the Python-list
mailing list