Nick Coghlan committed 136bafc

Fix heading levels

Comments (0)

Files changed (1)


 Using Special Methods in Explicitly Asynchronous Code
 One challenge that arises when writing explicitly asynchronous code is
 how to compose it with other elements of Python syntax like operators,
 Naming conventions
 The examples below follow Guido's convention in NDB, where it is assumed
 that synchronous and asynchronous versions of operations are offered in the
 Asynchronous conditional expressions
 While loops and if statements are a very simple case, as it's merely a
 matter of using an asynchronous expression in place of the normal
         # The loop will suspend if necessary when evaluating the condition
 Asynchronous Iterators
 Asynchronous iterators work by producing Futures or coroutines at each
 step. These are then waited for explicitly in the body of the loop::
 Asynchronous Context Managers
 Asynchronous context managers are able to cope with blocking
 operations on entry to a with statement by implementing them as a
 Asynchronous Operators
 The approach described above generalises to other operators, such as
 addition or attribute access: rather than returning a result directly,