Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104348
| From | justin walters <walters.justin01@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Pythonic love |
| Date | 2016-03-08 09:17 -0800 |
| Message-ID | <mailman.51.1457457429.15725.python-list@python.org> (permalink) |
| References | <nbl0lo$5o5$1@gioia.aioe.org> <nbmjrf$jrd$1@ger.gmane.org> <CAO1D73GO5ey3_Fskao9Ch3+3FC7HVEGWWZ2T1zjoV1aT2MsS0g@mail.gmail.com> <nbn0fl$i9t$1@ger.gmane.org> |
Sorry about the top posting. I'm new to mailing lists. I should just reply to the python-list@python.org address then? Also, thank you for the generator clarification. On Mar 8, 2016 9:09 AM, "jmp" <jeanmichel@sequans.com> wrote: > On 03/08/2016 05:49 PM, justin walters wrote: > >> Correct me if I'm wrong, but don't python generators usually use the yield >> statement so they can be used in list comprehensions? >> > > Hello, > > Please don't top post. > > Generator expressions are different from generator functions. They are > both generators but use a different syntax. > > generator function: > > def func(iterable): > for i in iterable: yield i > > > the generator expression version would be > > (i for i in iterable) > > > Both have their use cases but everytime you can actually use an generator > expression, it's probably the correct thing to do. > > Cheers, > > jm > > -- > https://mail.python.org/mailman/listinfo/python-list >
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Pythonic love Fillmore <fillmore_remove@hotmail.com> - 2016-03-07 17:51 -0500
Re: Pythonic love Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-03-07 22:52 +0000
Re: Pythonic love sohcahtoa82@gmail.com - 2016-03-07 15:03 -0800
Re: Pythonic love Fillmore <fillmore_remove@hotmail.com> - 2016-03-07 18:12 -0500
Re: Pythonic love Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-07 16:13 -0700
Re: Pythonic love Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-07 23:19 +0000
Re: Pythonic love jmp <jeanmichel@sequans.com> - 2016-03-08 14:25 +0100
Re: Pythonic love justin walters <walters.justin01@gmail.com> - 2016-03-08 08:49 -0800
Re: Pythonic love Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-08 16:55 +0000
Re: Pythonic love jmp <jeanmichel@sequans.com> - 2016-03-08 18:00 +0100
Re: Pythonic love justin walters <walters.justin01@gmail.com> - 2016-03-08 09:17 -0800
Re: Pythonic love jstitch@invernalia.homelinux.net (Javier Novoa C.) - 2016-03-08 11:27 -0600
Re: Pythonic love Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-08 21:10 -0500
csiph-web