[Numpy-discussion] Ransom Proposals
tim.hochberg at cox.net
Sat Mar 25 16:21:04 CST 2006
>On 3/24/06, Tim Hochberg <tim.hochberg at cox.net> wrote:
>>* copy -- Yes, I understand that the copy flag is probably not going to
>>change for backward compatibility reasons if nothing else, but there was
>>one last point I wanted to make about the copy flag.
>I am all for eliminating boolean parameters no matter what the
>consequences are. For me foo(bool, ...) is always a sign that it
>should be refactored to foo(...) an bar(...), with shared code
>possibly going to _baz(...).
Regarding the backwards compatibility issues, on some reflection, they
really don't seem that bad. Assuming the conversion programs I've heard
about can take care of the other issues, for this one all that needs to
be done is to search for "array(\(.*\), copy=0|False, \(.*\))" and
replace it with "asarray(\1, \3)". [Those aren't real regex's, they're
made up psuedo regex gobbeldy gook, but I'll come up with the real deal
if there's any chance that'll it'd help push things along.] I'd expect
the rate of false positives from this to be extremely low.
More information about the Numpy-discussion