Benjamin Kaplan wrote:
On Thu, Jun 17, 2010 at 4:20 PM, bart.c <ba...@freeuk.com> wrote:

I don't know how Python does things, but an object should either
specify a special way of duplicating itself, or lend itself to some
standard way of doing so. (So for a list, it's just a question of
copying the data in the list, then recursively duplicating each new
element..)

It's the recursively duplicating each element that's the problem. How
do you know when to stop?

When you reach a primitive object (one not comprising other objects). (I don't know if Python allows circular references, but that would give problems anyway: how would you even print out such a list?)

--
Bartc
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to