[Pythonmac-SIG] [ann] appscript 0.4.0 released
Chris Ryland
cpr at emsoftware.com
Fri Feb 13 19:09:23 EST 2004
On Friday, February 13, 2004, at 03:46 PM, has wrote:
> Heh, I'm not a big fan of operators; know what you mean though. Reason
> I'm trying it here is that a conventional method call-based approach
> soon becomes unreadable when constructing an expression of any
> complexity; for example:
>
> items.test(its.size.greaterthan(12).AND(its.color.equals([0,0,0])))
>
> versus:
>
> items.test(its.size > 12 and its.color == [0,0,0])
items.test(lambda: its.size > 12 and its.color = [0, 0, 0]))
would be great! And "all" you have to do is to walk the AST for the
lambda (bytecodes are really too low-level and too late for different
semantics) and ignore any Pythonic meanings, instead generating the
AppleEvent equivalent code (typed Lisp, really). That gives you a lot
of freedom!
Cheers!
--Chris Ryland / Em Software, Inc. / www.emsoftware.com
More information about the Pythonmac-SIG
mailing list