ORMs use special methods for classes for a and b to bind to statements and configure what is done.
>= for is handled by the object.__ge__() method, and != calls object.__ne__() .
Typically, the ORM object used for a returns a new object with the applicable operation, which allows you to perform chain operations, and the fn() function expects such an ORM object and will read the operation status there.
source share