Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109514 > unrolled thread

how to work await x operator?

Started byICT Ezy <ictezy@gmail.com>
First post2016-06-05 08:18 -0700
Last post2016-06-05 18:21 +0300
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  how to work await x operator? ICT Ezy <ictezy@gmail.com> - 2016-06-05 08:18 -0700
    Re: how to work await x operator? Marko Rauhamaa <marko@pacujo.net> - 2016-06-05 18:21 +0300

#109514 — how to work await x operator?

FromICT Ezy <ictezy@gmail.com>
Date2016-06-05 08:18 -0700
Subjecthow to work await x operator?
Message-ID<23eb1050-f9ed-4bfc-8626-cd3bea329066@googlegroups.com>
how to work await x Await expression operator? 
pl explain any one ...

[toc] | [next] | [standalone]


#109515

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-06-05 18:21 +0300
Message-ID<87oa7f7jan.fsf@elektro.pacujo.net>
In reply to#109514
ICT Ezy <ictezy@gmail.com>:

> how to work await x Await expression operator? 
> pl explain any one ...

A coroutine can't be called directly. A call to a coroutine must be
prefixed with the "async" keyword. That allows Python to perform a
context switch between coroutines in case the coroutine needs to wait
for the operation to complete.


Marko

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web