[C++-sig] Python Assignment

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Sat Aug 17 23:55:25 CEST 2002


--- David Abrahams <dave at boost-consulting.com> wrote:
> If you want, you can arrange for b = copy.copy(a) to make a copy of a. I
> believe that if you implement pickling for MyMatrix that this just works
> automatically (but I don't remember). Take a look at the copy module in the
> Python standard library.

The detour through pickle is potentially expensive. So this is how I do it:

b = a.deep_copy()

where I supply the deep_copy() method myself.

Ralf


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com




More information about the Cplusplus-sig mailing list