By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,404 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,404 IT Pros & Developers. It's quick & easy.

What makes an object uncopyable?

P: n/a
I am trying to make a copy of a certain Python object using the
copy.copy() function. When I try to perform this operation I get an
error like the following:

copy.Error: un(shallow)copyable object of type ...

What factors determine whether an object can be copied?

Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 17 Jun 2005 15:41:07 -0700, tr*********@verizon.net
<tr*********@verizon.net> wrote:
I am trying to make a copy of a certain Python object using the
copy.copy() function. When I try to perform this operation I get an
error like the following:

copy.Error: un(shallow)copyable object of type ...

What factors determine whether an object can be copied?


You are probably trying to copy an instance of a class implemented in
C extension. AFAIK, Python classes have copy support by default, but
extension classes need to implement copy/pickle protocol.

- kv
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.