← board

';'-separated class attributes lose all but the first

class P:
    k = 1; j = 2
print(P.j)        # CPython: 2    Nil Python: class method not found: j

Cause and fix

The three statement loops (the program loop, PyParseBlock, and the module loop) all consume ;. A class body is different, because PyRegisterClassMembers reads it at the token level first. Every attribute, alias and annotation branch there requires the name to open a line, and every one then skips to the next NEWLINE. Fixing only the class parser would have left the pre-pass disagreeing with it.

So the shape is normalised in the lexer, the way the one-line def/class suite already is. PyClassBodySemicolons runs after each lex and applies to lines that are:

On those lines, a ; outside brackets becomes a NEWLINE token. A one-line def f(self): a; b is untouched, because the lexer has already made it an indented suite one level deeper, where the ; belongs to the def.

Measured (2026-09-29, fixedpoint 8edde2f6b68a)