your feedback to my first project please

Terry Reedy tjreedy at udel.edu
Tue Jan 10 20:53:15 EST 2012


On 1/10/2012 9:06 AM, Jean-Michel Pichavant wrote:

> - I quite dislike your avg method which does more than averaging, it
> also inserts a value and removes another modifying the object in place.
> It could be very confusing for someone reading your code. Fortunately,
> you have documented it, that makes it acceptable. Why don't you make avg
> only averaging. Surely you can use the add method right before.

Or use a better name, like running_average or run_mean (if that is what 
it is doing).

-- 
Terry Jan Reedy




More information about the Python-list mailing list