Expand description
The Python rule catalogue. Spec §2.
The same constructs the Rust, C, C++ and Java catalogues cover, mapped onto Python’s own tree. The rules are the same two shapes; what differs is the node each construct becomes, which is the difference a diff of two catalogues is supposed to show.
Two rules are named for what Python actually does rather than for what the sibling catalogues do, because the target is not the same shape:
enum-to-intenumandbitmask-to-intflag. Java has no rule of that name because a Javaenumconstant’s identity is its ordinal; Python’senum.IntEnummember is anint, so the enumerator names and the values live in one declaration.module-to-class. Python’s own unit of scope is the module, and one IDL file becomes one Python module, so a nested IDL module has to become something inside it. A class is the only construct Python has that nests and carries a name.
Functions§
- catalogue
- Every Python rule.