On Wed, 06 Oct 2010 23:00:10 +0200, TP wrote:

> I think I prefer doing an explicit copy.copy, because it allows to
> remind the reader that it is very important to take care of that. 

I think a comment is better for that. It's better to explicitly say 
something is important than to assume the reader will guess.

Besides, what if the caller wants to supply their own list, and they 
*want* it modified in place rather than a copy made? (I have no idea why 
they might want this, but anything is possible...) You should avoid 
making copies except in methods that are *for* making copies.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to