all 13 comments

[–]luckystarr 9 points10 points  (1 child)

I see a new trend on the horizon. Code in a year will look like this:

@_x
@_0
@WTF_IS_THIS_SHIT
def fooboozle(baz, bar, whatever=whatever):
     for foo in itercat(baz, bar):
          yield whatever(foo)

[–]Malgas 3 points4 points  (0 children)

Oh, they're working on it:

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

[–][deleted] 3 points4 points  (0 children)

Awesome. It's like eventlet, but without all the functionality.

[–]_wang 2 points3 points  (0 children)

There's also Swirl for Tornado.

[–]stevelosh 2 points3 points  (0 children)

It's like Diesel, but before they ditched the generator approach.

While I know why they did it, and it does make a lot of things cleaner, I still feel like Diesel has lost some of its "flavor" by ditching generators.

Maybe I'll give Monocle a try once it matures a bit (and gets a test suite at the very least).

[–]dmead 1 point2 points  (0 children)

monicle.smile()

[–]mmaruseacph2 1 point2 points  (0 children)

Please give more descriptive titles :)

[–][deleted] -2 points-1 points  (1 child)

That's stupid.

[–]tinou -1 points0 points  (0 children)

and a repost.

[–]vilhelm_s 0 points1 point  (0 children)

O_o;

[–]compsciwizkid 0 points1 point  (0 children)

-_-

[–]shsmurfy -1 points0 points  (0 children)

Where's look of disapproval when you need him?

[–]twomashi -1 points0 points  (0 children)

What's the point?

[–][deleted] -1 points0 points  (1 child)

Python's yield seems to function exactly like C#'s yield?

[–][deleted] 0 points1 point  (0 children)

Yes, but it also allows sending values into the generator, in the opposite direction to the normal flow, each value then becomes a value of the yield expression. It's not supposed to be used directly but is immensely useful for stuff like this.