Steven D'Aprano wrote in news:4e1fd009$0$29986$c3e8da3 $54964...@news.astraweb.com in gmane.comp.python.general:
> I'm designing an API for some lightweight calculator-like statistics > functions, such as mean, standard deviation, etc., and I want to support > missing values. Missing values should be just ignored. E.g.: > > mean([1, 2, MISSING, 3]) => 6/3 = 2 rather than 6/4 or raising an error. If you can't make your mind up then maybe you shouldn't: MISSING = MissingObject() def mean( sequence, missing = MISSING ): ... Rob. -- http://mail.python.org/mailman/listinfo/python-list