How to check if a python function is a Tornado generator

Viewed 397

Given a function foobar how can I check that it's a generator that is expected by Tornado?

In [1]: from tornado import gen

In [2]: @gen.coroutine
   ...: def foobar():
   ...:     print 'boom'
   ...:

I wasn't able to find any properties, that could indicate that it's correctly decorated by a gen.coroutine

2 Answers
Related