I want a class along the lines of the following
Foo(object):
@property
@asyncio.coroutine
def bar(self):
# This will need to run some blocking code via loop.run_in_executor()
return 'bar'
And then I want to access the properties without having to a yield from
# In a loop...
foo = Foo()
foo.bar #This will return a generator object, but I want it to return 'bar'.
yield from foo.bar #This will return 'bar', but I don't want to do the yield from.
Is such a thing possible?