summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string_format_cp310.py
blob: 77295330beab43ae0ffa613df021d7f0940d4005 (plain) (blame)
1
2
3
4
5
6
7
8
9
# Python 3.10+ functionality test for {} format string

def test(fmt, *args):
    print('{:8s}'.format(fmt) + '>' +  fmt.format(*args) + '<')

test("{:0s}", "ab")
test("{:06s}", "ab")
test("{:<06s}", "ab")
test("{:>06s}", "ab")