Not exactly, since it loses all the meaning of the keywords (and self-explanatory power). So either move to smalltalk (which has the same syntax) or translate to Python + kwdargs which keeps most of the meaning (but not all of it):
Otherwise there is a default container based on what the type of thing is being created (e.g. 'Person' vs. 'Group' vs. 'Container', etc.). I had a DSL in Tcl which I really liked, but now we are using Python which has rejected my mind's attempts to bend it to my will of "I want to type only the information which is new" and "No I don't want to write a crazy string and then parse it" (e.g. myLib.exec("create Person with uid=foo mail=[email protected] at c=us" -- I hate this kind of trick when Tcl made it so easy...)
root = Root()
person = root.create("Person")
// we know identifier is a special
identifier = person.create("Identifier")
identifier.set("dn", "uid=foo,c=us")
person.set("mail", "[email protected]")
return service.update(root)
Also delete, etc. So we have on the one had creation of a data object for a call, and also the use of that data object in a call. Ideally it would be a one-line command so that I can give myself a Pythonic command line for the system.
0
u/masklinn Apr 14 '08 edited Apr 14 '08
Not exactly, since it loses all the meaning of the keywords (and self-explanatory power). So either move to smalltalk (which has the same syntax) or translate to Python + kwdargs which keeps most of the meaning (but not all of it):
Or decompose into chained methods methods e.g.