Skip to content

Commit 28af6d8

Browse files
committed
Fix placement of clinic code
1 parent b60b67c commit 28af6d8

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

Objects/unicodeobject.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13060,30 +13060,6 @@ unicode_swapcase_impl(PyObject *self)
1306013060
return case_operation(self, do_swapcase);
1306113061
}
1306213062

13063-
/*[clinic input]
13064-
13065-
@staticmethod
13066-
str.maketrans as unicode_maketrans
13067-
13068-
x: object
13069-
13070-
y: unicode=NULL
13071-
13072-
z: unicode=NULL
13073-
13074-
/
13075-
13076-
Return a translation table usable for str.translate().
13077-
13078-
If there is only one argument, it must be a dictionary mapping Unicode
13079-
ordinals (integers) or characters to Unicode ordinals, strings or None.
13080-
Character keys will be then converted to ordinals.
13081-
If there are two arguments, they must be strings of equal length, and
13082-
in the resulting dictionary, each character in x will be mapped to the
13083-
character at the same position in y. If there is a third argument, it
13084-
must be a string, whose characters will be mapped to None in the result.
13085-
[clinic start generated code]*/
13086-
1308713063
static int
1308813064
unicode_maketrans_from_dict(PyObject *x, PyObject *newdict)
1308913065
{
@@ -13123,6 +13099,30 @@ unicode_maketrans_from_dict(PyObject *x, PyObject *newdict)
1312313099
return 0;
1312413100
}
1312513101

13102+
/*[clinic input]
13103+
13104+
@staticmethod
13105+
str.maketrans as unicode_maketrans
13106+
13107+
x: object
13108+
13109+
y: unicode=NULL
13110+
13111+
z: unicode=NULL
13112+
13113+
/
13114+
13115+
Return a translation table usable for str.translate().
13116+
13117+
If there is only one argument, it must be a dictionary mapping Unicode
13118+
ordinals (integers) or characters to Unicode ordinals, strings or None.
13119+
Character keys will be then converted to ordinals.
13120+
If there are two arguments, they must be strings of equal length, and
13121+
in the resulting dictionary, each character in x will be mapped to the
13122+
character at the same position in y. If there is a third argument, it
13123+
must be a string, whose characters will be mapped to None in the result.
13124+
[clinic start generated code]*/
13125+
1312613126
static PyObject *
1312713127
unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z)
1312813128
/*[clinic end generated code: output=a925c89452bd5881 input=7bfbf529a293c6c5]*/

0 commit comments

Comments
 (0)