> On 8 Sep 2018, at 14:23, Anders Hovmöller <bo...@killingar.net> wrote:
>
>> To me, the "30% of all arguments" deserves more careful examination.
>> Does the proposal significant improve the reading and writing of this
>> code? And are there other, perhaps better, ways of improving this
>> code?
>
> Maybe my tool should be expanded to produce more nuanced data? Like how many
> of those 30% are:
>
> - arity 1,2,3, etc? (Arity 1 maybe should be discarded as being counted
> unfairly? I don’t think so but some clearly do)
> - matches 1 argument, 2,3,4 etc? Matching just one is of less value than
> matching 5.
>
> Maybe some other statistics?
I've updated the tool to also print statistics on how many arguments there are
for the places where it can perform the analysis.
I also added statistics for how long variable names it finds. I'm pretty sure
almost all places with the length 1 or 2 for variable names passed would be
better if they had been synchronized. Those places are also an argument for my
suggestion I think, because if you gain something to synchronize then that will
make you less likely to shorten variable names down to 1 or 2 characters to get
brevity. Maybe...
If you exclude calls to functions with just one argument (not parameters) then
the hit percentage on the code base at work drops from ~36% to ~31%. Not a big
difference overall.
I've updated the gist:
https://gist.github.com/boxed/610b2ba73066c96e9781aed7c0c0b25c
<https://gist.github.com/boxed/610b2ba73066c96e9781aed7c0c0b25c>
/ Anders
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/