Objects/codeobject.c
static int
all_name_chars(PyObject *o)
{
    static char ok_name_char[256];
    static const unsigned char *name_chars = (unsigned char *)NAME_CHARS;
    const unsigned char *s, *e;

    if (!PyUnicode_IS_ASCII(o))
        return 0;

    if (ok_name_char[*name_chars] == 0) {
        const unsigned char *p;
        for (p = name_chars; *p; p++)
            ok_name_char[*p] = 1;
    }
    s = PyUnicode_1BYTE_DATA(o);
    e = s + PyUnicode_GET_LENGTH(o);
    while (s != e) {
        if (ok_name_char[*s++] == 0)
            return 0;
    }
    return 1;
}
/* all_name_chars(s): true iff all chars in s are valid NAME_CHARS */
true iff all chars in s are valid NAME_CHARS
true iff all chars in s are valid NAME_CHARS
static int
all_name_chars(PyObject *o)
{
    static char ok_name_char[256];
    static const unsigned char *name_chars = (unsigned char *)NAME_CHARS;
    const unsigned char *s, *e;
    if (!PyUnicode_IS_ASCII(o))
        return 0;
    if (ok_name_char[*name_chars] == 0) {
        const unsigned char *p;
        for (p = name_chars; *p; p++)
            ok_name_char[*p] = 1;
    }
    s = PyUnicode_1BYTE_DATA(o);
    e = s + PyUnicode_GET_LENGTH(o);
    while (s != e) {
        if (ok_name_char[*s++] == 0)
            return 0;
    }
    return 1;
}
static int all_name_chars ( PyObject * o ) { static char ok_name_char [ 256 ] ; static const unsigned char * name_chars = ( unsigned char * ) NAME_CHARS ; const unsigned char * s , * e ; if ( ! PyUnicode_IS_ASCII ( o ) ) return 0 ; if ( ok_name_char [ * name_chars ] == 0 ) { const unsigned char * p ; for ( p = name_chars ; * p ; p ++ ) ok_name_char [ * p ] = 1 ; } s = PyUnicode_1BYTE_DATA ( o ) ; e = s + PyUnicode_GET_LENGTH ( o ) ; while ( s != e ) { if ( ok_name_char [ * s ++ ] == 0 ) return 0 ; } return 1 ; }
all_name_chars(s): true iff all chars in s are valid NAME_CHARS
all_name_chars ( s ) : true iff all chars in s are valid NAME_CHARS