Attack a sacred Python Cow

Terry Reedy tjreedy at udel.edu
Sun Jul 27 21:22:41 EDT 2008



Russ P. wrote:

> When I write a function in which a data member will be used several
> times, I usually do something like this:
> 
>     data = self.data
> 
> so I can avoid the clutter of repeated use of "self.data".

Another reason people do this is for speed, even if self.data is used 
just once but in a loop.




More information about the Python-list mailing list