[Numpy-discussion] NotImplemented returns

Pauli Virtanen pav at iki.fi
Thu May 27 12:57:54 EDT 2010


Thu, 27 May 2010 10:21:14 -0600, Charles R Harris wrote:
[clip]
> Maybe an enhancement ticket. The NotImplemented return is appropriate
> for some functions, but for functions with a single argument we should
> probably raise an error.

A NotImplemented value leaking to the the user is a bug. The function 
should raise a ValueError instead.

NotImplemented is meant only for use as a placeholder singleton in 
implementation of rich comparison operations etc., and we shouldn't 
introduce any new meanings IMHO.

-- 
Pauli Virtanen




More information about the NumPy-Discussion mailing list