torchio
torchio copied to clipboard
Use keyword-only arguments
For the sake of completeness, PEP-570 about positional-only arguments should also be kept in mind. https://www.python.org/dev/peps/pep-0570/
def name(positional_only_parameters, /, positional_or_keyword_parameters, *, keyword_only_parameters):
I prefer the keywords-only signatures for public API, however, it is slightly inconvenient (too much typing). Positional only arguments could be considered for very stable part of an API. I do not actually recommend it, but when there is a decision about function signatures, then it is a good time to consider all options. :)