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

Guido van Rossum guido at python.org
Sun Mar 4 17:23:23 CET 2012

On Sat, Mar 3, 2012 at 7:42 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> I'm still +1 on adding named arguments to built-ins where needed, e.g.
>>>> "spam".find('a', end=1)
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: find() takes no keyword arguments
> but I hope that would be uncontroversial!

No, because str may be subclassed, so this change would break
backwards compatibility for subclasses that chose a different name
instead of 'end'.

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list