[SciPy-Dev] Use of `input` in ndimage

Jaime Fernández del Río jaime.frio at gmail.com
Thu Jun 19 13:46:25 EDT 2014


I submitted a PR (
https://github.com/scipy/scipy/pull/3745#issuecomment-46590839) to remove
use of the built-in Python function name `input` from the ndimage module,
where it is used as the argument name for the input data in almost every
single function. A full list of functions involved has been pulled by
Warren on the discussion of that PR.

Warren wisely pointed out that changing the name of an argument changes the
API, and should therefore not be done lightly, as it could break existing
user code. One could argue. or at least wish, that, since `input` is
typically the first argument of the functions involved, and is
non-optional, calls using it as a keyword argument should be rare. But the
potential harm is undeniable.

It is ugly and a clear violation of PEP8, but although this kind of things
are usually an accident waiting to happen, it has also proven harmless so
far. So for now I have simply closed the PR, letting practicality beat
purity. And so it will remain, unless the community thinks this special
case is not special enough to break the rules. Inputs on how to handle the
API change to minimize impact to users are also welcome.

Thanks,

Jaime

-- 
(\__/)
( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
de dominación mundial.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20140619/2385d0c6/attachment.html>


More information about the SciPy-Dev mailing list