mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#17217: merge with 3.3.
This commit is contained in:
commit
33136fa6e7
1 changed files with 3 additions and 3 deletions
|
@ -14,10 +14,10 @@ maxsize = support.MAX_Py_ssize_t
|
||||||
def testformat(formatstr, args, output=None, limit=None, overflowok=False):
|
def testformat(formatstr, args, output=None, limit=None, overflowok=False):
|
||||||
if verbose:
|
if verbose:
|
||||||
if output:
|
if output:
|
||||||
print("%r %% %r =? %r ..." %\
|
print("{!a} % {!a} =? {!a} ...".format(formatstr, args, output),
|
||||||
(formatstr, args, output), end=' ')
|
end=' ')
|
||||||
else:
|
else:
|
||||||
print("%r %% %r works? ..." % (formatstr, args), end=' ')
|
print("{!a} % {!a} works? ...".format(formatstr, args), end=' ')
|
||||||
try:
|
try:
|
||||||
result = formatstr % args
|
result = formatstr % args
|
||||||
except OverflowError:
|
except OverflowError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue