Operators
>= — Greater-than or equal
Tests non-strict ordering in the greater direction. Sets interpret it as superset, including equality. Comparisons do not automatically form a total order: incomparable sets can fail both >= and <=. Custom __ge__ and reflected __le__ can define behavior independently. Rich comparisons share precedence and support chaining: the middle operand is evaluated once, and later operands are skipped when a preceding comparison is falsy. If both operands decline the comparison, ordering raises TypeError. Custom dispatch uses __ge__ and the counterpart __le__ on the other operand; a right-hand subclass may have priority.
Formal Syntax & Structure
python syntaxpython
left >= rightParameters & Attributes
| Name | Type | Description |
|---|---|---|
| left | object | First operand; its type participates in operation selection. |
| right | object | Second operand; supported values depend on the operand types. |
Return Value
bool or custom result
Boolean for ordinary built-in comparisons; custom rich comparison methods can return other values.
Working Example
Example Snippetpython
print(7 >= 7)print((2,) >= (1,9))print({1,2} >= {2})