-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
C-bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
{:d} format is supported to pass a boolean value. See the following test case. CPython can execute it and return expected result, while RustPython report a TypeError.
for i in range(12):
print('{:d}, '.format(chr(i) in "ss"), end='')
if i % 16 == 1:
print()
Behaviors on CPython:
0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Behaviors on RustPython
Traceback (most recent call last):
File "/home/xxm/Desktop/RustPython/test.py", line 169, in <module>
print('{:d}, '.format(chr(i) in "ss"), end='')
TypeError: unsupported format string passed to bool.__format__
Ubuntu 18.04
RustPython 0.2.0 0284059
CPython 3.8.0, 3.9.0, 3.11.3
Metadata
Metadata
Assignees
Labels
C-bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers