Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #49479 > unrolled thread
| Started by | Joshua Landau <joshua.landau.ws@gmail.com> |
|---|---|
| First post | 2013-06-30 07:46 +0100 |
| Last post | 2013-06-30 07:46 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Stupid ways to spell simple code Joshua Landau <joshua.landau.ws@gmail.com> - 2013-06-30 07:46 +0100
| From | Joshua Landau <joshua.landau.ws@gmail.com> |
|---|---|
| Date | 2013-06-30 07:46 +0100 |
| Subject | Re: Stupid ways to spell simple code |
| Message-ID | <mailman.4024.1372574848.3114.python-list@python.org> |
On 30 June 2013 07:06, Chris Angelico <rosuav@gmail.com> wrote: > There's a bit of a discussion on python-ideas that includes a function > that raises StopIteration. It inspired me to do something stupid, just > to see how easily I could do it... > > On Sun, Jun 30, 2013 at 3:45 PM, Nick Coghlan <ncoghlan@gmail.com> wrote: > Re: [Python-ideas] "Iteration stopping" syntax >>>>> def stop(): >> ... raise StopIteration > > Here's a much more insane way to spell that: > > stop = (lambda: 0 and (yield 1))().__next__ > > So, here's a challenge: Come up with something really simple, and > write an insanely complicated - yet perfectly valid - way to achieve > the same thing. Bonus points for horribly abusing Python's clean > syntax in the process. > > Go on, do your worst! You'll have to excuse me -- I'm writing a library to do just that. I'll be done in a few weeks.
Back to top | Article view | comp.lang.python
csiph-web