tests/cpydiff: Add case for str.ljust/rjust.

pull/3207/head
Paul Sokolovsky 2017-07-09 15:04:26 +03:00
rodzic 0c5369a1f0
commit ad3abcd324
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,7 @@
"""
categories: Types,str
description: str.ljust() and str.rjust() not implemented
cause: MicroPython is highly optimized for memory usage. Easy workarounds available.
workaround: Instead of `s.ljust(10)` use `"%-10s" % s`, instead of `s.rjust(10)` use `"% 10s" % s`. Alternatively, `"{:<10}".format(s)` or `"{:>10}".format(s)`.
"""
print('abc'.ljust(10))