In article <51d06cb6$0$29999$c3e8da3$54964...@news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote:

> On Sun, 30 Jun 2013 16:06:35 +1000, Chris Angelico wrote:
> 
> > 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.
> 
> Here's a trivially stupid way to find the length of an iterable:
> 
> sum(1 for obj in iterable)

That's how you would do it in a map-reduce environment :-)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to