Issue 22145: <> in parser spec but not lexer spec (original) (raw)
Neither nor. <> is a conditional token, conditional on the prior future import. This is the nature of PEP 236: some syntax might be part of the language in one module, but not in another, in the same version of the language.
In general, the documentation should refer to future syntax as such (i.e. mention that it is available only if a future import was made). Not so in this case: this specific feature is deliberately undocumented (or: under-documented, given that nothing is truly undocumented in free software). It's an easter egg - you found it.