mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-32157: Removed explicit quotes around %r and {!r}. (#4582)
This commit is contained in:
parent
c615be5166
commit
a4a3020abc
4 changed files with 6 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue