mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*.
This commit is contained in:
parent
8c9331057d
commit
f8d7d41507
5 changed files with 20 additions and 37 deletions
|
@ -3243,9 +3243,8 @@ timezone_new(PyTypeObject *type, PyObject *args, PyObject *kw)
|
|||
{
|
||||
PyObject *offset;
|
||||
PyObject *name = NULL;
|
||||
if (PyArg_ParseTupleAndKeywords(args, kw, "O!|O!:timezone", timezone_kws,
|
||||
&PyDateTime_DeltaType, &offset,
|
||||
&PyUnicode_Type, &name))
|
||||
if (PyArg_ParseTupleAndKeywords(args, kw, "O!|U:timezone", timezone_kws,
|
||||
&PyDateTime_DeltaType, &offset, &name))
|
||||
return new_timezone(offset, name);
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue