Public Member Functions | Public Attributes
tornado.gen.Return Class Reference

List of all members.

Public Member Functions

def __init__

Public Attributes

 value

Detailed Description

Special exception to return a value from a `coroutine`.

If this exception is raised, its value argument is used as the
result of the coroutine::

    @gen.coroutine
    def fetch_json(url):
        response = yield AsyncHTTPClient().fetch(url)
        raise gen.Return(json_decode(response.body))

In Python 3.3, this exception is no longer necessary: the ``return``
statement can be used directly to return a value (previously
``yield`` and ``return`` with a value could not be combined in the
same function).

By analogy with the return statement, the value argument is optional,
but it is never necessary to ``raise gen.Return()``.  The ``return``
statement can be used with no arguments instead.

Definition at line 205 of file gen.py.


Constructor & Destructor Documentation

def tornado.gen.Return.__init__ (   self,
  value = None 
)

Definition at line 225 of file gen.py.


Member Data Documentation

Definition at line 225 of file gen.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Wed Sep 13 2017 03:18:20