New submission from Michael Van Biesbrouck:

Currently, using deepcopy on instance methods causes an exception to be
thrown.  This can be fixed by adding one line to

d[types.MethodType] = _deepcopy_atomic

This will not make duplicate copies of mutable values referenced within
the instance method (such as its associated instance), but it will be
the same as the handling of other function types (which have the same

messages: 57923
nosy: mlvanbie
severity: normal
status: open
title: deepcopy doesn't copy instance methods
type: behavior
versions: Python 2.5

Python-bugs-list mailing list 

Reply via email to