Assignments and globals

David Bolen db3l at fitlinxx.com
Fri Aug 18 17:33:20 EDT 2000


echuck3 at my-deja.com writes:

> Here's another good one: Copy a dictionary with the copy() method.
> Sounds good. Copy a list with...[:]? While I certainly support [:] as a
> valid technique that meshes with slicing, it wouldn't hurt to have a
> copy() method for copying.

One alternative is to use the copy module to copy objects
consistently, and it also offers deep copies for when you need them.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list