x or yPerform the logical disjunction ("or") operation on Python objects.
|
If one of the arguments is a Macaulay2 object, then it is first converted to a Python object.
|
|
Unlike Macaulay2, Python supports using or with non-boolean objects. In this case, the first argument is returned if it is "truthy". Otherwise, the second argument is returned.
|
|
In Python, when the first argument is truthy, then is is returned immediately without evaluating the second argument. This is known as "short-circuiting". However, in Macaulay2, both arguments are evaluated before the Python disjunction method is called.
|
|
However, if the first argument is the Macaulay2 true object, then short-cicuiting will occur.
|
The source of this document is in Python/doc/logical.m2:108:0.