getattr(x, y)
x@@y
This is equivalent to the Python getattr function.
|
|
In Python, "." is generally used as a shortcut for this function, but it is not easily overloadable in Macaulay2. Instead, @@ may be used for this purpose, as its precedence is similar to "." In this case, y need not be a string.
|
The object getattr is a method function.