David a écrit : >>Any thoughts would be most appreciated, though I would like to stress >>that I don't think Python should support the syntax I'm proposing I'd >>just like to know if I can extend a copy of it to do that. >> > > > You can use syntax like this: > > class MyJob1(Job): > depends(MyJob2) > depends(MyJob3) > (snip) > (where 'depends' is a DSL-like construct. See Elixir > (elixir.ematia.de) for an example of how to implement DSL statements > like "depends". Check their implementation of the "belongs_to" > statement.
+1 on this. I've payed a bit with elixir's 'statements' API, and while it's relying on a (in)famous hack, it does the job. (snip) -- http://mail.python.org/mailman/listinfo/python-list