[SciPy-User] scipy.optimize named argument inconsistency

Denis Laxalde denis.laxalde at mcgill.ca
Wed Sep 7 11:47:45 EDT 2011


On Tue, 06 Sep 2011 13:53:44 -0500,
Bruce Southey wrote:
> I would say Ralf's idea of new functions would be the best approach even 
> if scipy is still beta. But I would extend it by providing that 
> suggested unified function and creating  'internal' versions (have a 
> leading underscore) of existing functions. While it is initially code 
> duplication, it also permits to change not only the argument but also 
> the return values as needed. Thus you would have the advantage provided 
> by Ralf and avoid the naming problem without affecting existing users.

I like this idea of internal functions in combination with the unified
interfaces.
Yet, I think code (and potential maintenance work) duplication could be
avoided by moving the code of respective functions to their internal
clone and calling the latter in the former. Internal functions could
have their parameters/returns names and order standardized. Existing
functions' signature would be kept as is but deprecated and the unified
interfaces would call internal functions.

-- 
Denis




More information about the SciPy-User mailing list