News for hackers. Stuff that matters.
Re:A new ggplot is here by chubot on Friday July 08, 2016 @11:57PM (#12060010)
Yeah that's a good point. I haven't used this ggplot library, but it seems like it could use lambdas. And then you don't break syntax highlighting.

One other place I've seen this done is in the numexpr for Python.

https://github.com/pydata/numexpr

It does seem like this

    ne.evaluate('a*b-4.1*a > 2.5*b') 
could be

    ne.evaluate(lambda a, b: a*b - 4.1*a > 2.5*b)
The lambda is never executed because it compiles to machine code and not Python byte code, but that shouldn't make a difference. You should still be able to use the AST of the body as input to the compiler.

And then a and b have to be pulled out of locals() automatically or something.

There are no comments on this comment yet.