[Numpy-discussion] what to clean up, what to leave as is
Charles R Harris
charlesr.harris at gmail.com
Fri Jan 24 12:57:47 EST 2020
On Fri, Jan 24, 2020 at 10:42 AM Kevin Sheppard <kevin.k.sheppard at gmail.com>
> I think some types of clean-ups, for example, imports, are pretty low
> cost, low risk and don't have much bearing on and it might be best to do
> them all at once.
> f-strings are also pretty simple but can be abused to the detriment of
> code around (for example, moving a string defined in a variable outside a
> function into the function just so it can have an f-string).
> I think more general code clean-up, for example, removing list around
> iterators (e.g., list(map(f, i)) should be mostly avoided unless there is a
> compelling case to prefer the iterator for performance reasons.
I tend to see that as a matter of timing. At some point such things become
archaic and unfamiliar as developers who grew up with modern Python become
more common. But there is no rush.
The problem with code history is trickier, and almost unavoidable over
time. The information is still there, but it is harder to dig it out.
Probably there need to be better tools to deal with that. This is
especially apparent from the early C code cleanup that I did just to get
more modern and readable code styling. My name is all over code that I
didn't write, just formatted. But the cleanup was necessary for maintenance
if nothing else.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion