On Sep 19, 10:48 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> y = type(x)(x)

Nice trick, but is it better than the explicit:
 y = copy.copy(x)

(I think not, because copy.copy works for example, on classes
which take more than one argument to their constructor).

--
Paul Hankin

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

Reply via email to