[issue45821] Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation

Alex Waygood report at bugs.python.org
Fri Nov 19 11:18:39 EST 2021


Alex Waygood <Alex.Waygood at Gmail.com> added the comment:

It seems to me that there are two ways of resolving this:


(1) Change the Python implementation to match the C implementation (make these parameters positional-only in the Python implementation).

(2) Change the C implementation to match the Python implementation (make these parameters positional-or-keyword in the C implementation).


If the decision is that solution (1) is the way to go, I'd be happy to submit a PR fixing this. If the decision is that solution (2) would be better, however, I'm not confident enough with writing C code to submit a PR.

The C implementation is most widely used, so I think strategy (1) would not have too many backwards-compatibility concerns. Strategy (2) is still probably slightly more backwards-compatible, however.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45821>
_______________________________________


More information about the Python-bugs-list mailing list