1
0
forked from VimPlug/jedi

Create a name for the generators.

This commit is contained in:
Dave Halter
2017-01-04 18:12:33 +01:00
parent cd23499fbe
commit 01099ce5a9
2 changed files with 9 additions and 0 deletions

View File

@@ -158,6 +158,10 @@ class GeneratorMixin(object):
gen_obj = compiled.get_special_object(self.evaluator, 'GENERATOR_OBJECT')
return gen_obj.py__class__()
@property
def name(self):
return compiled.CompiledContextName(self, 'generator')
class Generator(GeneratorMixin, context.Context):
"""Handling of `yield` functions."""