[C++-sig] deepcopy

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Mon Oct 7 05:11:38 CEST 2002


Sometimes I need to make a copy of a wrapped C++ object in Python. Python's
copy.deepcopy() will only work for objects that are pickleable. I am wondering
if it wouldn't be easy to make the C++ copy constructor available by default in
Python, for example through the member functon .copy(). That would be much more
convenient than .def'ing copy for everything explicitly. Similar to "no_init"
there could be a "no_copy" to suppress the automatic generation of .copy().
Ralf


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com




More information about the Cplusplus-sig mailing list