osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]


On Fri, 6 Jul 2018 at 08:52 Chris Barker - NOAA Federal via Python-Dev <
python-dev at python.org> wrote:

> Are we just having fun here?
>
> Or might we actually start using a new naming convention for
> the-syntax-formerly-known-as-generator-expressions?
>

If you can create a groundswell of support then maybe.

-Brett


>
> -CHB
>
> Sent from my iPhone
>
> > On Jul 3, 2018, at 11:54 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>
> wrote:
> >
> > Steven D'Aprano wrote:
> >> - list builder syntax is syntax which returns a list;
> >> - dict builder syntax is syntax which returns a dict;
> >> - set builder syntax is syntax which returns a set;
> >> - generator builder syntax is syntax which returns a generator.
> >
> > You only get a list/dict/set from the first three after
> > you've run the iterators within it, but with a generator
> > expression, you already have a generator before you've
> > run it. That makes it feel different to me.
> >
> > --
> > Greg
> > _______________________________________________
> > 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/chris.barker%40noaa.gov
> _______________________________________________
> 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/brett%40python.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180706/717f366f/attachment.html>