mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Silence a py3k warning.
This commit is contained in:
parent
eb72991fbb
commit
fcc500ebc4
1 changed files with 6 additions and 3 deletions
|
@ -593,6 +593,9 @@ class TestGetcallargsFunctions(unittest.TestCase):
|
|||
def makeCallable(self, signature):
|
||||
"""Create a function that returns its locals(), excluding the
|
||||
autogenerated '.1', '.2', etc. tuple param names (if any)."""
|
||||
with check_py3k_warnings(
|
||||
("tuple parameter unpacking has been removed", SyntaxWarning),
|
||||
quiet=True):
|
||||
code = ("lambda %s: dict(i for i in locals().items() "
|
||||
"if not is_tuplename(i[0]))")
|
||||
return eval(code % signature, {'is_tuplename' : self.is_tuplename})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue