gh-130790: Remove references about unicode's readiness from comments (#130801)

This commit is contained in:
Sergey Miryanov 2025-03-04 00:18:09 +05:00 committed by GitHub
parent 8a64a62002
commit 3a7f17c7e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 9 additions and 28 deletions

View file

@ -308,9 +308,7 @@ verify_end_of_number(struct tok_state *tok, int c, const char *kind) {
return 1;
}
/* Verify that the identifier follows PEP 3131.
All identifier strings are guaranteed to be "ready" unicode objects.
*/
/* Verify that the identifier follows PEP 3131. */
static int
verify_identifier(struct tok_state *tok)
{

View file

@ -509,8 +509,6 @@ _PyPegen_new_identifier(Parser *p, const char *n)
if (!id) {
goto error;
}
/* PyUnicode_DecodeUTF8 should always return a ready string. */
assert(PyUnicode_IS_READY(id));
/* Check whether there are non-ASCII characters in the
identifier; if so, normalize to NFKC. */
if (!PyUnicode_IS_ASCII(id))