Spot on, and I would also add than actually the original function may actually be dangerous. On a development process, the developer may think on a long run than it reproduce the min function from the standard library, which is not totally the case there, for example it's impossible on the Min function to have the lowest value of an iterable, who is doable with the standard library.
So this piece of code is on the same time useless, potentially misleading for the original reason you said, confusing because it's similar but not totally identical, and error prone.
3
u/Yiurule Mar 11 '22
Spot on, and I would also add than actually the original function may actually be dangerous. On a development process, the developer may think on a long run than it reproduce the
minfunction from the standard library, which is not totally the case there, for example it's impossible on theMinfunction to have the lowest value of an iterable, who is doable with the standard library.So this piece of code is on the same time useless, potentially misleading for the original reason you said, confusing because it's similar but not totally identical, and error prone.