None versus MISSING sentinel -- request for design feedback

Terry Reedy tjreedy at udel.edu
Fri Jul 15 23:35:29 CEST 2011


On 7/15/2011 6:19 AM, Steven D'Aprano wrote:

Use None as default. Requiring users to use your special value would be 
a nuisance. They may have data prepared separately from your module.

> Rob Williscroft wrote:

>> MISSING = MissingObject()
>> def mean( sequence, missing = MISSING ):

This is also a good idea.

> So you think the right API is to allow the caller to specify what counts as
> a missing value at runtime? Are you aware of any other statistics packages
> that do that?

AFAIK, standard feature on major packages. BMDP, SAS and SPSS as I 
remember. Missing values could be specified on a per column basis.

-- 
Terry Jan Reedy




More information about the Python-list mailing list