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


Groups > comp.lang.python > #90118

Re: asyncio: What is the difference between tasks, futures, and coroutines?

References (2 earlier) <4ea2d5ac-8c19-4a53-9a09-fe6dbe4a52bd@googlegroups.com> <5549ab43$0$11108$c3e8da3@news.astraweb.com> <b0022fbc-74e2-4990-9773-9e5e07d51f14@googlegroups.com> <mailman.216.1431059590.12865.python-list@python.org> <aca29698-6b7f-4ac7-ba1f-0e60fd28d639@googlegroups.com>
Date 2015-05-08 15:09 +1000
Subject Re: asyncio: What is the difference between tasks, futures, and coroutines?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.217.1431061769.12865.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, May 8, 2015 at 2:53 PM, Rustom Mody <rustompmody@gmail.com> wrote:
> Yeah I know
> And if python did not try to be so clever, I'd save some time with
> student-surprises
>
>> In a program, an expression
>> statement simply discards its result, whether it's None or 42 or
>> [1,2,3] or anything else. You could write an interactive interpreter
>> that has some magic that recognizes that certain functions always
>> return None (maybe by checking their annotations), and omits printing
>> their return values, while still printing the return values of other
>> functions.
>
>
> Hoo Boy!  You seem to be in the 'the-more-the-better' (of magic) camp

No way! I wouldn't want the interactive interpreter to go too magical.
I'm just saying that it wouldn't break Python to have it do things
differently.

>> I'm not sure what it'd gain you, but it wouldn't change the
>> concepts or semantics surrounding None returns.
>
> It would sure help teachers who get paid by the hour and would rather spend
> time on technical irrelevantia than grapple with significant concepts

Why have the concept of a procedure? Python's rule is simple: Every
function either returns a value or raises an exception. (Even
generators. When you call a generator function, you get back a return
value which is the generator state object.) The procedure/function
distinction is irrelevant.

ChrisA

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


Thread

asyncio: What is the difference between tasks, futures, and coroutines? Paul  Moore <p.f.moore@gmail.com> - 2015-05-05 08:22 -0700
  Re: asyncio: What is the difference between tasks, futures, and coroutines? Zachary Ware <zachary.ware+pylist@gmail.com> - 2015-05-05 11:11 -0500
    Re: asyncio: What is the difference between tasks, futures, and coroutines? Paul  Moore <p.f.moore@gmail.com> - 2015-05-05 10:55 -0700
  Re: asyncio: What is the difference between tasks, futures, and coroutines? Terry Reedy <tjreedy@udel.edu> - 2015-05-05 13:15 -0400
  Re: asyncio: What is the difference between tasks, futures, and coroutines? Marko Rauhamaa <marko@pacujo.net> - 2015-05-05 20:45 +0300
    Re: asyncio: What is the difference between tasks, futures, and coroutines? Rustom Mody <rustompmody@gmail.com> - 2015-05-05 21:47 -0700
      Re: asyncio: What is the difference between tasks, futures, and coroutines? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-06 15:48 +1000
        Re: asyncio: What is the difference between tasks, futures, and coroutines? Rustom Mody <rustompmody@gmail.com> - 2015-05-07 21:06 -0700
          Re: asyncio: What is the difference between tasks, futures, and coroutines? Chris Angelico <rosuav@gmail.com> - 2015-05-08 14:33 +1000
            Re: asyncio: What is the difference between tasks, futures, and coroutines? Rustom Mody <rustompmody@gmail.com> - 2015-05-07 21:53 -0700
              Re: asyncio: What is the difference between tasks, futures, and coroutines? Rustom Mody <rustompmody@gmail.com> - 2015-05-07 21:55 -0700
              Re: asyncio: What is the difference between tasks, futures, and coroutines? Chris Angelico <rosuav@gmail.com> - 2015-05-08 15:09 +1000
                Re: asyncio: What is the difference between tasks, futures, and coroutines? Rustom Mody <rustompmody@gmail.com> - 2015-05-07 23:36 -0700
                Re: asyncio: What is the difference between tasks, futures, and coroutines? Chris Angelico <rosuav@gmail.com> - 2015-05-08 16:42 +1000
                Re: asyncio: What is the difference between tasks, futures, and coroutines? Dave Angel <davea@davea.name> - 2015-05-08 07:53 -0400
                Re: asyncio: What is the difference between tasks, futures, and coroutines? Chris Angelico <rosuav@gmail.com> - 2015-05-08 23:02 +1000
      Re: asyncio: What is the difference between tasks, futures, and coroutines? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-05-06 09:11 -0400
        Re: asyncio: What is the difference between tasks, futures, and coroutines? Rustom Mody <rustompmody@gmail.com> - 2015-05-07 21:20 -0700
  Re: asyncio: What is the difference between tasks, futures, and coroutines? Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-05 11:46 -0600
    Re: asyncio: What is the difference between tasks, futures, and coroutines? Paul  Moore <p.f.moore@gmail.com> - 2015-05-05 11:03 -0700
  Re: asyncio: What is the difference between tasks, futures, and coroutines? Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-05 12:55 -0500
  Re: asyncio: What is the difference between tasks, futures, and coroutines? Terry Reedy <tjreedy@udel.edu> - 2015-05-05 18:38 -0400

csiph-web