You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
objstr: Very basic implementation of % string formatting operator.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
print("=%s=" % 1)
|
||||
print("=%s=%s=" % (1, 2))
|
||||
print("=%s=" % (1,))
|
||||
print("=%s=" % [1, 2])
|
||||
|
||||
print("=%s=" % "str")
|
||||
print("=%r=" % "str")
|
||||
|
||||
try:
|
||||
print("=%s=%s=" % 1)
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
|
||||
try:
|
||||
print("=%s=%s=%s=" % (1, 2))
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
|
||||
try:
|
||||
print("=%s=" % (1, 2))
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
Reference in New Issue
Block a user