Positional-only parameters for Python
Positional-only parameters for Python
Posted Apr 11, 2019 2:11 UTC (Thu) by k8to (guest, #15413)In reply to: Positional-only parameters for Python by quotemstr
Parent article: Positional-only parameters for Python
I think the fact that the arg names are exposed by default is essentially a good accident that forces interfaces to be a bit more usable than they are by default.
Amusingly I went to a good deal of trouble in some code I made to make the args keyword-only without making the implementation of the callsites harder to read. I had explicit documentation of how calls were required to be made, but used inspection to enforce it. I could used def func(**kwargs) but manually coding all the dispatch would have been really unfortunate.
