Skip to content

Commit 6fe1ab8

Browse files
"X"
1 parent 14c9536 commit 6fe1ab8

File tree

4 files changed

+55
-55
lines changed

4 files changed

+55
-55
lines changed

Doc/library/unicodedata.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ following functions:
144144
1
145145

146146

147-
.. function:: isidstart(chr, /)
147+
.. function:: isxidstart(chr, /)
148148

149149
Return ``True`` if *chr* is a valid identifier start per the
150150
`Unicode Standard Annex #31 <https://www.unicode.org/reports/tr31/>`_,
@@ -159,7 +159,7 @@ following functions:
159159
.. versionadded:: next
160160

161161

162-
.. function:: isidcontinue(chr, /)
162+
.. function:: isxidcontinue(chr, /)
163163

164164
Return ``True`` if *chr* is a valid identifier charcter per the
165165
`Unicode Standard Annex #31 <https://www.unicode.org/reports/tr31/>`_,

Lib/test/test_unicodedata.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -276,32 +276,32 @@ def test_east_asian_width_9_0_changes(self):
276276
self.assertEqual(self.db.ucd_3_2_0.east_asian_width('\u231a'), 'N')
277277
self.assertEqual(self.db.east_asian_width('\u231a'), 'W')
278278

279-
def test_isidstart(self):
280-
self.assertTrue(self.db.isidstart('S'))
281-
self.assertTrue(self.db.isidstart('\u0AD0')) # GUJARATI OM
282-
self.assertTrue(self.db.isidstart('\u0EC6')) # LAO KO LA
283-
self.assertTrue(self.db.isidstart('\u17DC')) # KHMER SIGN AVAKRAHASANYA
284-
self.assertTrue(self.db.isidstart('\uA015')) # YI SYLLABLE WU
285-
self.assertTrue(self.db.isidstart('\uFE7B')) # ARABIC KASRA MEDIAL FORM
286-
287-
self.assertFalse(self.db.isidstart(' '))
288-
self.assertFalse(self.db.isidstart('0'))
289-
self.assertRaises(TypeError, self.db.isidstart)
290-
self.assertRaises(TypeError, self.db.isidstart, 'xx')
291-
292-
def test_isidcontinue(self):
293-
self.assertTrue(self.db.isidcontinue('S'))
294-
self.assertTrue(self.db.isidcontinue('_'))
295-
self.assertTrue(self.db.isidcontinue('0'))
296-
self.assertTrue(self.db.isidcontinue('\u00BA')) # MASCULINE ORDINAL INDICATOR
297-
self.assertTrue(self.db.isidcontinue('\u0640')) # ARABIC TATWEEL
298-
self.assertTrue(self.db.isidcontinue('\u0710')) # SYRIAC LETTER ALAPH
299-
self.assertTrue(self.db.isidcontinue('\u0B3E')) # ORIYA VOWEL SIGN AA
300-
self.assertTrue(self.db.isidcontinue('\u17D7')) # KHMER SIGN LEK TOO
301-
302-
self.assertFalse(self.db.isidcontinue(' '))
303-
self.assertRaises(TypeError, self.db.isidcontinue)
304-
self.assertRaises(TypeError, self.db.isidcontinue, 'xx')
279+
def test_isxidstart(self):
280+
self.assertTrue(self.db.isxidstart('S'))
281+
self.assertTrue(self.db.isxidstart('\u0AD0')) # GUJARATI OM
282+
self.assertTrue(self.db.isxidstart('\u0EC6')) # LAO KO LA
283+
self.assertTrue(self.db.isxidstart('\u17DC')) # KHMER SIGN AVAKRAHASANYA
284+
self.assertTrue(self.db.isxidstart('\uA015')) # YI SYLLABLE WU
285+
self.assertTrue(self.db.isxidstart('\uFE7B')) # ARABIC KASRA MEDIAL FORM
286+
287+
self.assertFalse(self.db.isxidstart(' '))
288+
self.assertFalse(self.db.isxidstart('0'))
289+
self.assertRaises(TypeError, self.db.isxidstart)
290+
self.assertRaises(TypeError, self.db.isxidstart, 'xx')
291+
292+
def test_isxidcontinue(self):
293+
self.assertTrue(self.db.isxidcontinue('S'))
294+
self.assertTrue(self.db.isxidcontinue('_'))
295+
self.assertTrue(self.db.isxidcontinue('0'))
296+
self.assertTrue(self.db.isxidcontinue('\u00BA')) # MASCULINE ORDINAL INDICATOR
297+
self.assertTrue(self.db.isxidcontinue('\u0640')) # ARABIC TATWEEL
298+
self.assertTrue(self.db.isxidcontinue('\u0710')) # SYRIAC LETTER ALAPH
299+
self.assertTrue(self.db.isxidcontinue('\u0B3E')) # ORIYA VOWEL SIGN AA
300+
self.assertTrue(self.db.isxidcontinue('\u17D7')) # KHMER SIGN LEK TOO
301+
302+
self.assertFalse(self.db.isxidcontinue(' '))
303+
self.assertRaises(TypeError, self.db.isxidcontinue)
304+
self.assertRaises(TypeError, self.db.isxidcontinue, 'xx')
305305

306306
class UnicodeMiscTest(UnicodeDatabaseTest):
307307

Modules/clinic/unicodedata.c.h

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/unicodedata.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ unicodedata_UCD_name_impl(PyObject *self, int chr, PyObject *default_value)
15271527
}
15281528

15291529
/*[clinic input]
1530-
unicodedata.UCD.isidstart
1530+
unicodedata.UCD.isxidstart
15311531
15321532
self: self
15331533
chr: int(accept={str})
@@ -1538,8 +1538,8 @@ Return True if the character has the XID_Start property, else False.
15381538
[clinic start generated code]*/
15391539

15401540
static PyObject *
1541-
unicodedata_UCD_isidstart_impl(PyObject *self, int chr)
1542-
/*[clinic end generated code: output=29fbeaf6491d9f85 input=b71b6b1b2db3c16d]*/
1541+
unicodedata_UCD_isxidstart_impl(PyObject *self, int chr)
1542+
/*[clinic end generated code: output=944005823c72c3ef input=9353f88d709c21fb]*/
15431543
{
15441544
if (UCD_Check(self)) {
15451545
const change_record *old = get_old_record(self, chr);
@@ -1553,7 +1553,7 @@ unicodedata_UCD_isidstart_impl(PyObject *self, int chr)
15531553
}
15541554

15551555
/*[clinic input]
1556-
unicodedata.UCD.isidcontinue
1556+
unicodedata.UCD.isxidcontinue
15571557
15581558
self: self
15591559
chr: int(accept={str})
@@ -1564,8 +1564,8 @@ Return True if the character has the XID_Continue property, else False.
15641564
[clinic start generated code]*/
15651565

15661566
static PyObject *
1567-
unicodedata_UCD_isidcontinue_impl(PyObject *self, int chr)
1568-
/*[clinic end generated code: output=5ae694da0ee16534 input=01b4ccd399484e6b]*/
1567+
unicodedata_UCD_isxidcontinue_impl(PyObject *self, int chr)
1568+
/*[clinic end generated code: output=9438dcbff5ca3e41 input=bbb8dd3ac0d2d709]*/
15691569
{
15701570
if (UCD_Check(self)) {
15711571
const change_record *old = get_old_record(self, chr);
@@ -1643,8 +1643,8 @@ static PyMethodDef unicodedata_functions[] = {
16431643
UNICODEDATA_UCD_EAST_ASIAN_WIDTH_METHODDEF
16441644
UNICODEDATA_UCD_DECOMPOSITION_METHODDEF
16451645
UNICODEDATA_UCD_NAME_METHODDEF
1646-
UNICODEDATA_UCD_ISIDSTART_METHODDEF
1647-
UNICODEDATA_UCD_ISIDCONTINUE_METHODDEF
1646+
UNICODEDATA_UCD_ISXIDSTART_METHODDEF
1647+
UNICODEDATA_UCD_ISXIDCONTINUE_METHODDEF
16481648
UNICODEDATA_UCD_LOOKUP_METHODDEF
16491649
UNICODEDATA_UCD_IS_NORMALIZED_METHODDEF
16501650
UNICODEDATA_UCD_NORMALIZE_METHODDEF

0 commit comments

Comments
 (0)