Let's say you have a network server built around a single-threaded event loop—gevent, Twisted, asyncore, something simple you built on top of select.select, whatever. It's important to handle every event quickly.
People want sorted collections in the stdlib, but no one has ever made a solid proposal to add them.
You're writing a GUI app using Tkinter or PySide or your favorite GUI library, and testing it in-place, everything works.

Then you build a .app bundle out of it, double-click it in Finder, and it can't read your environment variables.
There's a pair of intertwined threads in python-ideas about coming up with a way to break out of list comprehensions and generator expressions early.

Oscar Benjamin gives a good example:

isprime = all(n % p for p in takewhile(lambda p: p**2 < n, primes_seen))

That's ugly.
Blog Archive
About Me
About Me
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.