[Numpy-discussion] Name change of the ptp() function

Robert Kern robert.kern at gmail.com
Fri May 10 09:17:51 EDT 2013


On Fri, May 10, 2013 at 2:04 PM, Eli Bressert <ebressert at gmail.com> wrote:
> That's a good point regarding the range function names. But, I think
> the issue still stands on the readability of the ptp function.
> Regarding PEP20 it's stated that "readability counts."
>
> If you regard what ptp is supposed to replace, array.max() -
> array.min(), the aforementioned follows the PEP20 better as it is more
> readable. If valuerange() is not an acceptable name, maybe span()?

Sure, it's probably more readable, and that would be the controlling
factor if this were a new function. But that's not really the
operative question here. Are the gains in readability worth the
nontrivial costs of deprecating and removing the old name? I, for one,
am generally not in favor of such deprecations.

--
Robert Kern



More information about the NumPy-Discussion mailing list