bpo-32157: Removed explicit quotes around %r and {!r}. (#4582)

This commit is contained in:
Serhiy Storchaka 2017-11-28 22:54:42 +02:00 committed by GitHub
parent c615be5166
commit a4a3020abc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -1381,7 +1381,7 @@ def getclosurevars(func):
func = func.__func__
if not isfunction(func):
raise TypeError("'{!r}' is not a Python function".format(func))
raise TypeError("{!r} is not a Python function".format(func))
code = func.__code__
# Nonlocal references are named in co_freevars and resolved
@ -1624,7 +1624,7 @@ def getgeneratorlocals(generator):
bound values."""
if not isgenerator(generator):
raise TypeError("'{!r}' is not a Python generator".format(generator))
raise TypeError("{!r} is not a Python generator".format(generator))
frame = getattr(generator, "gi_frame", None)
if frame is not None: