Paul Ganssle <p.gans...@gmail.com> added the comment:

I think a positional-only argument would be the best option if we could do it, 
but it would be a backwards-incompatible change and it's probably not worth the 
hassle.

If anyone is using the keyword argument, they're probably using `format=` 
rather than `fmt=`, since it's pretty rare for anyone to use the pure python 
version of datetime. PyPy uses it, but I think they tend to aim for consistency 
with the C API of CPython, and it seems like they already patch s/fmt/format/ 
themselves: 
https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/lib_pypy/datetime.py#L781

If anyone wants to make a PR I think we can fix this for 3.10, though 
unfortunately because it is an API change it can't be backported. I think in 
typeshed they can safely change from `fmt` to `format` even today (which would 
almost certainly be more accurate to end user use cases).

----------
nosy:  -rkm
stage:  -> needs patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41260>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to