News for hackers. Stuff that matters.
Re:Python Generators in Depth by haberman on Tuesday February 26, 2013 @12:25PM (#5286959)
Another very nice and mind-bending presentation on coroutines, that eventually takes things so far that he creates a mini "OS" with coroutines as tasks, complete with system calls and a scheduler: http://dabeaz.com/coroutines/
Re:Python Generators in Depth by manaskarekar on Tuesday February 26, 2013 @01:08PM (#5287237)
The talk by the same David Beazley on Co-routines: http://blip.tv/pycon-us-videos-2009-2010-2011/a-curious-cour...

The talk from David Mertz on Co-routines: https://www.youtube.com/watch?v=b7R3-_ViNxk

Re:Python Generators in Depth by mapleoin on Tuesday February 26, 2013 @02:21PM (#5287770)
Wow that David Beazley presentation is annoying. He spends the first 10 minutes in the introduction, complaining about how he won't have enough time to go through his presentation.
Re:Python Generators in Depth by d23 on Tuesday February 26, 2013 @06:11PM (#5289333)
I didn't watch the video, but going through the slides I was absolutely fascinated. I've been craving something new and advanced like this out of python for a while.
Re:Python Generators in Depth by webexcess on Tuesday February 26, 2013 @12:47PM (#5287110)
Thank you, I hadn't seen that. I've added that link to the bottom of my article.
Re:Python Generators in Depth by beagle3 on Wednesday February 27, 2013 @12:13AM (#5290793)
You use "assert gen.next() is None", but asserts might be dropped by optimizations, see e.g. http://docs.python.org/release/2.5.2/ref/assert.html - and your code will break.

assert should only be used for debugging, and only for things that should never happen. side effects on assert is a no-no. (Also in C)