[Python-ideas] Idea: The DSL operator.

Steve Howell showell30 at yahoo.com
Wed May 30 03:51:39 CEST 2007


Talin wrote:

> An SQL query as a DSL:
>   query = SQL??(name == "John" and age > 25)
>   result_iter = query.execute()

Can you flesh this out with the added complication
that my SQL?? thingy wants to include in its
expression some kind of Python function that sits at
the module level, such convert_birthday_to_age?

My fear is that even with an AST at my DSL library's
disposal, I would still want hints from Python as to
better ways to scope things in the AST given to me,
and without actually changing the Python bytecode, I
still have my hands tied.

Or am I being too pessimistic?  Or does your proposal
already account for that?






       
____________________________________________________________________________________Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/



More information about the Python-ideas mailing list