> Jean-Michel wrote: Module names should be lowercase You're right. I was too lazy and just copied the class name. I will keep that in mind for the future. ;)
> Jean-Michel 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. Hm. It is (in most cases) only used in that way... So because I am lazy I thought it might be a good idea. But If I make add() return self I could do chaining, can't I? p.e.: as = AverageStack(10) avg = as.add(12).avg() Would that be better? > Jean-Michel wrote: A very important information is mising from your > documentation : the type of the parameters. [...] PEP 257 True. I'm still struggling here how to do it. I'd like to write the types into the signature of the method (like in Java) or use some other way like in javadoc. """@param name type description""" Writing it into the docstring as plain text is not very appealing to me. Any concrete tipps or examples? TIA, Patrick -- http://mail.python.org/mailman/listinfo/python-list