Unbounded

class Unbounded

The unbounded (*) upper multiplicity bound: a top element ordered above every int.

A singleton – use the module-level UNBOUNDED instance, which all constructions return, so is and == agree. Because it orders above every integer, a resolved upper bound can be compared directly without a None branch: count <= bounds.upper is True for any count when the bound is unbounded. Comparison against a non-int/Unbounded operand is undefined (returns NotImplemented, so Python raises TypeError).

Used in