Comprehenions can also define self variables.

Also related to #932.
This commit is contained in:
Dave Halter
2017-09-09 20:20:05 +02:00
parent 40f4f032c6
commit c7f225439d
2 changed files with 10 additions and 0 deletions

View File

@@ -526,3 +526,10 @@ class Foo(object):
Foo().create_class().a
#? float()
Foo().b
class Foo(object):
def comprehension_definition(self):
return [1 for self.b in [1]]
#? int()
Foo().b