On Mon, Feb 11, 2008, Greg Ewing wrote:
> 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...

Certainly -- that's why __copy__() exists, right?
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

"All problems in computer science can be solved by another level of     
indirection."  --Butler Lampson
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to