__bytes__ - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


__bytes__

convert RTable to Python bytes

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

x.__bytes__()

bytes(x)

Parameters

x

-

RTable object

Description

• 

__bytes__ function returns a Python bytes expression for the RTable x. If the RTable is not a ByteArray, an error is raised.

• 

This function can also be called by simply entering bytes(x).

Examples

The following interactive session illustrates the use of these operators:

>>> import maple

>>> import maple.namespace

>>> expr = maple.execute('Array([72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33], datatype=integer[1]):')

>>> # It is most natural to use these functions in prefix form without underscores

>>> bytes(expr)

b'Hello, world!'

See Also

OpenMaple

OpenMaple/Python/API

OpenMaple/Python/RTable