Chris Angelico writes:

 > Look at the real-world examples that I posted and tell me what I
 > should be doing differently, if it's an anti-pattern to be
 > discouraged.

IIRC, you didn't post real-world examples relevant to Paul's comment
because you posted only the call sites.

So, for example, if a function call you posted were refactored to a
local function (perhaps using a nonlocal declaration, though cases
where that's necessary should be rare), you wouldn't need to pass
those arguments at all.

Also, see my earlier post for one kind of style change (specifically,
taking advantage of comprehensions rather than writing a marshalling
function) I've made that means recently I do a lot less same naming.
That one's explicitly related to the dict subthread, but it's also
true that in my code marshalling functions used to be a substantial
source of same name game (though I typically called them with
positional parameters by copying the prototype a la Rick Teachey, and
so avoided the kind of code you posted).

Granted, it's not so easy to avoid that with third party functions,
but I personally have rarely had that kind of issue with library
functions, whether from the stdlib or from PyPI.

Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/SM7OHCV76IFBBD23JUYOI2KAXPXDDJ4S/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to