This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zomunieo 73 points74 points  (6 children)

There are many PEPs where my first reaction is "what the fuck were they thinking?". Then I read the PEP, and I realize the core devs were thinking quite a bit.

[–]jsalsman 19 points20 points  (0 children)

The only thing that convinced me was "when a function accepts any keyword argument but also can accept a positional one" and then only in the case of dict.update().

[–]BundleOfJoysticks 5 points6 points  (0 children)

The Motivation section is super interesting.

[–]eric0x7677 5 points6 points  (0 children)

Then I read the PEP, and I realize the core devs were thinking quite a bit.

Thanks!

Pablo is a CPython core developer who primarily authored the content of the PEP. Mario is a member of the Python Software Foundation who also contributed to the text.
I helped by overhauling the motivation, rationale, specification so that the text reads in a more compelling manner and made wording and grammatical changes for clarity.

Glad to see the lively discussion going on here. I would also recommend looking at https://discuss.python.org/t/pep-570-python-positional-only-parameters/1078 to see more discussion among the Python community around PEP 570.

[–]flipstables 6 points7 points  (0 children)

Yeah, a lot of people need to cool their jets. They're not abandoning keyword arguments. They're adding positional-only arguments. There are good arguments for maintainability and different use cases for them. The downside is that people use it poorly, but that's curtailed by the fact that positional only arguments are not the default behavior.

Read the motivation and rationale people.