__getattr__
get attribute of Name
Calling Sequence
Parameters
Description
Examples
x.__getattr__(y)
x.y
x
-
Name object
y
__getattr__ forms a Maple module reference given Maple Name objects x and y.
This allows the use of the a.b syntax within Python to correspond to the colondash (:-) operator within Maple, allowing full access to the hierarchical Maple namespace.
The following interactive session implicitly uses __getattr__ to reference the function LinearAlgebra[Determinant] using the syntax maple.namespace.LinearAlgebra.Determinant.
>>> import maple
>>> import maple.namespace
>>> M = maple.execute('<<1,2>|<3,4>>:')
>>> det = maple.namespace.LinearAlgebra.Determinant
>>> det(M)
-2
See Also
OpenMaple
OpenMaple/Python/API
OpenMaple/Python/Expression
OpenMaple/Python/Name
Download Help Document