tool to check whether formal and actual parameters have similarnames

Terry Reedy tjreedy at udel.edu
Tue Aug 10 16:13:20 EDT 2004


"Amir Michail" <amichail at gmail.com> wrote in message
news:cfa3hb$387 at odak26.prod.google.com...
> def plot(x,y): ...
>
> plot( x1, y1 ) # ok
>
> plot( y1, x1 ) # not ok,

Reversing args reflects plot about 45 degree line, which is a quite
legitimate thing to do if that is what you want to do.  Perhaps original
coder got plot 'backwards' and editor want to reverse it without changes
name throughout code.

> but this is ok:  plot (x=y1, y=x1)

If *you* want to force yourself to jump thru hoops like this, go ahead, but
don't expect anyone else to follow ;-)

> Does this make any sense, even in a heuristic sense?

Not really.  I name things like age, weight, height, cholesteral_level with
their proper names or abbreviations thereof.  Your idea strikes me as an
interesting brainstorm that on second thought would best be left behind.

Terry J. Reedy






More information about the Python-list mailing list