Rant (was Re: x*x if x>10

greg greg at cosc.canterbury.ac.nz
Tue Jul 29 06:29:53 CEST 2008

Diez B. Roggisch wrote:

> I maybe should paraphrase "don't return objects you passed as arguments 
> from a function".

The important thing is that a function shouldn't modify
any object unless it's the express purpose of the function
to do so.

You could call this the "look but don't touch" rule.


More information about the Python-list mailing list