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


Groups > comp.lang.python > #75076

Question about asyncio doc example

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <saimadhavheblikar@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.056
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'subject:Question': 0.07; 'operation,': 0.16; 'subject:doc': 0.16; 'substitute': 0.16; 'code,': 0.22; 'example': 0.22; 'example.': 0.24; 'question': 0.24; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:python': 0.33; "i'd": 0.34; 'received:google.com': 0.35; 'there': 0.35; 'i.e.': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'url:3': 0.61; 'real': 0.63
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=AyixChSASLMPUx67fo9WowxxGzCHcxartdgFqj5FAQo=; b=GOumRY62Aaw+ynmwTFZhXrNe/+FGllvowK3Pvh7oetF2lRMmJkibSSk97JS/hoPX4o GO8yvpTRnXjKTTVimd42foXNgGw+SyvaCmRrUlT1uqw9UVghvkWuMSsRLGQ7ibaeeIEo NH+UmtYX74joR1DtzTmPgR64w4IjusPt4GiFJ0PHAFNuSxvhUrzwxbF8IwM1aTdJ5RTG XaAhJmYN4bztxliig279JbPxIm9mwAuojWw0jaY1KFGpFcOHGspsmArYI+j6lMXEpktz WYuAi6MKeNC2isCn0MqSNl6wmWjI2EhznWEpSK56HnmCM9zl7VqtAOuJV+sB25jQ8xHU YbVg==
X-Received by 10.180.73.139 with SMTP id l11mr2025360wiv.30.1406112266243; Wed, 23 Jul 2014 03:44:26 -0700 (PDT)
MIME-Version 1.0
From Saimadhav Heblikar <saimadhavheblikar@gmail.com>
Date Wed, 23 Jul 2014 16:13:46 +0530
Subject Question about asyncio doc example
To python-list@python.org
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12231.1406112267.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1406112267 news.xs4all.nl 2929 [2001:888:2000:d::a6]:39302
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75076

Show key headers only | View raw


Hi,

The example in question is
https://docs.python.org/3/library/asyncio-task.html#example-hello-world-coroutine.
I'd like to learn the purpose of the statement
"yield from asyncio.sleep(2)" in that example.

In particular, I'd like to know if asyncio.sleep() is used as a
substitute for slow/time consuming operation, i.e. in real code,
whether there will be a real time consuming statement in place of
asyncio.sleep().

-- 
Regards
Saimadhav Heblikar

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Question about asyncio doc example Saimadhav Heblikar <saimadhavheblikar@gmail.com> - 2014-07-23 16:13 +0530

csiph-web