[Python-Dev] PEP 492: What is the real goal?

Guido van Rossum guido at python.org
Wed Apr 29 22:30:58 CEST 2015


Maybe it would help to refer to PEP 342, which first formally introduced
the concept of coroutines (as a specific use case of generators) in Python.
Personally I don't care too much which term the PEP uses, as logn as it
defines its terms. The motivation is already clear to me; it's the details
that I care about before approving this PEP.

On Wed, Apr 29, 2015 at 1:19 PM, Nathaniel Smith <njs at pobox.com> wrote:

> On Wed, Apr 29, 2015 at 1:14 PM, Skip Montanaro
> <skip.montanaro at gmail.com> wrote:
> >
> > On Wed, Apr 29, 2015 at 2:42 PM, Yury Selivanov <yselivanov.ml at gmail.com
> >
> > wrote:
> >>
> >> Anyways, I'd be OK to start using a new term, if "coroutine" is
> >> confusing.
> >
> >
> > According to Wikipedia, term "coroutine" was first coined in 1958, so
> > several generations of computer science graduates will be familiar with
> the
> > textbook definition. If your use of "coroutine" matches the textbook
> > definition of the term, I think you should continue to use it instead of
> > inventing new names which will just confuse people new to Python.
>
> IIUC the problem is that Python has or will have a number of different
> things that count as coroutines by that classic CS definition,
> including generators, "async def" functions, and in general any object
> that implements the same set of methods as one or both of these
> objects, or possibly inherits from a certain abstract base class. It
> would be useful to have some terms to refer specifically to async def
> functions and the await protocol as opposed to generators and the
> iterator protocol, and "coroutine" does not make this distinction.
>
> -n
>
> --
> Nathaniel J. Smith -- http://vorpus.org
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/guido%40python.org
>



-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150429/1244a290/attachment.html>


More information about the Python-Dev mailing list