3 ms·
Are there other ways to get this argument-enforcing behaviour in functions, not just data classes?
by joshdavham 1y ago
Are there other ways to get this argument-enforcing behaviour in functions, not just data classes?
- pansa2 1y agoKeyword-only arguments? Yes: https://peps.python.org/pep-3102/ https://peps.python.org/pep-3102/ More recently, Python also added support for positional-only parameters: https://peps.python.org/pep-0570/ https://peps.python.org/pep-0570/