dictionary containing a list
hanumizzle
hanumizzle at gmail.com
Fri Oct 6 22:52:05 EDT 2006
On 6 Oct 2006 14:37:59 -0700, Ben <Benjamin.Barker at gmail.com> wrote:
> Is there a way to acheive what I was attempting ? I have done something
> almost identical with classes in a list before, and in that case a new
> instance was created for each list entry...
Not sure what you're trying to pull off, but you may wish to copy the
items in question. (Questions indeed!). Dictionarys have their own
shallow copy method, surprisingly named copy, and there is also a copy
module that does shallow and deep copy (copy and deepcopy, resp.)
HTH,
Theerasak
More information about the Python-list
mailing list