__len__
test for membership in the Expression
Calling Sequence
Parameters
Description
Examples
x.__len__()
len(x)
x
-
Expression object
__len__(x) returns the length of the Expression x as returned by the length function.
This function can also be called by simply entering len(x).
The following interactive session illustrates the use of __len__:
>>> import maple
>>> import maple.namespace
>>> S = maple.execute('{3, 4, 2*Pi, sqrt(2)};')
>>> # It is most natural to use len as a function in prefix form without underscores
>>> len(S)
4
>>> # It may however also be used with the expr.methodName syntax
>>> S.__len__()
See Also
OpenMaple
OpenMaple/Python/API
OpenMaple/Python/Expression
OpenMaple/Python/Indexable/__contains__
OpenMaple/Python/Indexable/__iter__
Download Help Document