Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: "Sven R. Kunze" Newsgroups: comp.lang.python Subject: Re: How the heck does async/await work in Python 3.5 Date: Tue, 23 Feb 2016 17:50:05 +0100 Lines: 14 Message-ID: References: <56c7d145$0$1597$c3e8da3$5496439d@news.astraweb.com> <56CB88D5.3090202@mail.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de RU8rZmGzOWB0KHsDw1zsXghtdwsE4SaP3kj7bgZlmYOw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'see.': 0.07; 'subject:How': 0.09; '22,': 0.09; 'python': 0.10; 'skip:p 40': 0.15; '12:50': 0.16; '2016': 0.16; 'async': 0.16; 'c++)': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'thanks.': 0.18; 'feb': 0.23; 'header:In-Reply- To:1': 0.24; 'mon,': 0.24; 'subject:/': 0.30; 'received:10.0': 0.34; 'best,': 0.35; 'something': 0.35; 'possible': 0.36; 'subject:work': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'charset:windows-1252': 0.62; 'more': 0.63; 'round.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1456246208; bh=eRwXONSSaAarMdGwolTjaQSa7pCdNJt62AO4f4Lvi18=; h=Subject:To:References:From:Date:In-Reply-To:From; b=QtlfwQIzyGJg7/H0WTgpTdY/zT7lonLvUPlXdxIytYHcFsjHuOi58IXEp41G4xgs6 cPsCSdhx1kmGHBLzC/SfVeTX+K5/P3/K4tlzSSV5qCHJlFgG1uXGcjGBwz3p1NsqQ4 Qgq1w7GqxRiT5N67ihvn8j61bCOEiUqrab/aLSuw= In-Reply-To: X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 508 X-purgate-ID: 154282::1456246208-000009F3-1E7C09B5/0/0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103406 On 23.02.2016 01:48, Ian Kelly wrote: > On Mon, Feb 22, 2016 at 3:16 PM, Sven R. Kunze wrote: >> Is something like shown in 12:50 ( cout << tcp_reader(1000).get() ) possible >> with asyncio? (tcp_reader would be async def) > loop = asyncio.get_event_loop() > print(loop.run_until_complete(tcp_reader(1000))) I see. Thanks. :) How come that Python (compared to C++) needs much more boilerplate to use async programming? Historically, it was the other way round. Best, Sven