[Python-ideas] keyword arguments everywhere (stdlib) - issue8706

Steven D'Aprano steve at pearwood.info
Fri Mar 2 09:43:05 CET 2012

Gregory P. Smith wrote:
> Something I'd like to bring up at the language summit next week if we have
> time (suggestion: limit it to 20 minutes), lets start discussion now:
> 1) Should _*all_* Python base types support keyword arguments on all of
> their methods.
> 2) Should _*all_* stdlib extension modules support keyword arguments on all
> of their functions and methods?

+1 on adding keyword arguments to built-in methods and functions where they 
would help readability, e.g str.find(c, start=23), even if this happens in a 
ad-hoc fashion.

+0 on forcing *all* built-in methods and functions to be updated to take 
keyword arguments out of a sense of purity, e.g. ord(char='c').

I think that "all built-ins should take keywords, so as to minimise the 
difference between them and pure-Python functions" is an admirable ideal. But 
it is an ideal, a nice-to-have rather than a must-have.


More information about the Python-ideas mailing list