__getitem__ - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


__getitem__

index Expression by key

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

x.__getitem__(y)

x[y]

Parameters

x

-

Expression object

y

-

Expression object or Python expression

Description

• 

__getitem__ attempts to access the key y from the Expression x.

• 

This function can also be getitemed by simply entering x[y].

Examples

The following interactive session illustrates the use of this operator.

>>> import maple

>>> import maple.namespace

>>> T = maple.execute('table([x=2, y=3]):')

>>> T[ maple.namespace.x ]

2

>>> T.__getitem__( maple.namespace.x )

2

See Also

OpenMaple

OpenMaple/Python/API

OpenMaple/Python/Expression