• [^] # Re: question sur article sametmax

    Posté par . En réponse au journal La programmation concurrente en mode Goto. Évalué à 4.

    Effectivement, comme déjà dit, foo() est qualifiée par async.

    Un bon exemple (avec ipython):

    In [1]: async def foo():
     ...: print('1')
     ...: 
    In [2]: def bar():
     ...: print('2')
     ...: 
    In [3]: bar()
    2
    In [4]: foo()
    Out[4]: <coroutine object foo at 0x7fc5c6adae08>