Do not do weird scope things in MethodDefiner

Variable `m` comes from a previous list comprehension earlier in the
function is not actually properly defined.
This commit is contained in:
Anthony Ramine 2020-03-14 12:09:17 +01:00
parent 4930479ac8
commit 3f30c7d8be

View file

@ -1654,6 +1654,8 @@ class MethodDefiner(PropertyDefiner):
(maplikeOrSetlikeOrIterable and
maplikeOrSetlikeOrIterable.isIterable() and
maplikeOrSetlikeOrIterable.isValueIterator())):
m = maplikeOrSetlikeOrIterable
# Add our keys/values/entries/forEach
self.regular.append({
"name": "keys",