objstr: Implement kwargs support for str.format().

This commit is contained in:
Paul Sokolovsky
2015-01-04 00:14:13 +02:00
parent ae58795c44
commit c114496641
4 changed files with 35 additions and 18 deletions

View File

@@ -60,6 +60,10 @@ test("{:@<6d}", -123)
test("{:@=6d}", -123)
test("{:06d}", -123)
print("{foo}/foo".format(foo="bar"))
print("{}".format(123, foo="bar"))
print("{}-{foo}".format(123, foo="bar"))
def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
fmt = '{'
if conv: