New submission from Yevhenii Hyzyla <hyz...@gmail.com>:

Method datetime.time.strftime in Python and C implementation has different 
signature. Python implementation use `fmt` as argument and C implementation use 
`format` as argument. 

Python implementation:
```python
def strftime(self, fmt):
  ...
```

C implementation
```C
static PyObject *
time_strftime(PyDateTime_Time *self, PyObject *args, PyObject *kw)
{
    PyObject *result;
    PyObject *tuple;
    PyObject *format;
    static char *keywords[] = {"format", NULL};

    if (! PyArg_ParseTupleAndKeywords(args, kw, "U:strftime", keywords,
                                      &format))
        return NULL;
```

My suggestion to use the same argument name for both implementations, for 
example to use `format` as in C implementation.

----------
components: Library (Lib)
messages: 406395
nosy: hyzyla
priority: normal
severity: normal
status: open
title: Use same function signature for datetime.time.strftime
type: enhancement
versions: Python 3.11

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

Reply via email to