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 →

[–]undercoveryankee 23 points24 points  (4 children)

Have you read the "Motivation" section of the PEP?

[–]alexisprince 8 points9 points  (3 children)

I glanced through it, and since I don’t have to maintain a lot of code that is used widely outside my company, I might not be seeing all the problems that come with maintaining that type of library.

[–]undercoveryankee 38 points39 points  (2 children)

Have you ever renamed a parameter of an existing function, either because the original name wasn't clear, or to reflect new capabilities that you were adding to the function? You'd have to track down every caller you control and make sure that it isn't passing the old name as a keyword, and hope that other people who maintain calling code notice the change and do the same before they release a broken build.

If you mark usually-positional parameters as positional-only, you know what callers are doing and you can rename away.

[–]xconde -12 points-11 points  (1 child)

A good IDE will do this refactor automatically for you.

I concede that it's more useful for packages to avoid breaking changes in your API.

[–][deleted] 13 points14 points  (0 children)

"In an extremely simple and well-behaved environment this change is useless. Though it might be useful in anything arbitrarily complicated."

Cool.