__bytes__
convert RTable to Python bytes
Calling Sequence
Parameters
Description
Examples
x.__bytes__()
bytes(x)
x
-
RTable object
__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).
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
Download Help Document