4 ms·
It's not redundant because regular python parameters without a / in the list can be called by name even if they don't have default values. The author may intend
by rat87 2y ago
It's not redundant because regular python parameters without a / in the list can be called by name even if they don't have default values. The author may intend them to be positional only but some callers might call them by name and you might break them when you refactor the parameter names, positional only avoids that.
Some people dislike positional only parameters but they're already used in a number of stdlib functions written in c so it makes sense to be able to write replacement with the same semantics in pure python as well as being able to express signatures for the c function
- emmelaich 2y agoThat is simply and obviously not true. See my example for math.sin above.