x &= yPerform the bitwise conjunction ("and") operation on Python objects, and assign the result to the first argument.
|
|
|
If the right-hand side is a Macaulay2 object, then it is first converted to a Python object.
|
|
|
If the Python class of x defines an __iand__ method for in-place and, then it will be called. Otherwise, x will and'ed with y in the usual way, creating a new Python object that is assigned back to x.
For example, NumPy arrays support in-place and. In the example below, x is modified directly, and no new object is created.
|
|
|
|
The source of this document is in Python/doc/bitwise.m2:295:0.