forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
MicroPython doesn't implement bytes(object)
at the moment, the method syntax is the only way to execute it, i.e.object.__bytes__()
. This can be see in CircuitPython too including 4.0.0 beta 5 (also shown in https://forums.adafruit.com/viewtopic.php?f=60&t=150071), example below from a REPL on CPX:
>>> bytes(obj1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'onetwo' object is not iterable
micropython#3158 notes the absence of this feature and there's a discussion in the comments on the balancing act of memory use by the interpreter.
Metadata
Metadata
Assignees
Labels
cpython apimodules from cpythonmodules from cpython