[Python-3000] Nix dict.copy()
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Feb 11 02:01:15 CET 2008
Aahz wrote:
> Let's suppose you have an object that represents an order. And let's
> suppose that this object needs to be copied to create a re-order (letting
> the customer preserve the information from the original order).
In that case, I would give my Order class a copy() method (or
re_order() or whatever name is appropriate) that does the right
thing for orders in the context of that application.
There are bound to be things that you *don't* want to copy from
the original order, e.g. the order ID, the date...
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand | (I'm not a morning person.) |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Python-3000
mailing list