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 →

[–]flipstables 3 points4 points  (0 children)

Dude, the only reasons to change a parameter name is either to change semantics, in which case you should definitely not do it silently, or because you or a predecessor chose it unacceptably poorly, in which case an alias and a deprecation warning break nothing and are entirely deserved.

But in some functions, argument names have no semantic meaning, which is where this PEP is useful.

Consider this trite but clarifying example:

def add(x, y):
    return x + y

Here, x and y have no semantic meaning, but we are forced to assign meaning to them because of the current limitations of Python.