Kenneth McDonald wrote:
> I can see an obvious but hacky way to define a Python function at
> runtime.
What way is this? All Python function definitions in your code are
executed at runtime.
> In case it's of interest in the context of the question, I need to
> define a largish set of functions (and similar methods) that
> define a XML-type markup language. Most of these functions will
> just be of the form
>
> def fun(...):
> return Node('fun', ...)
>
> so it'd definitely be nice to just create most of them
> automatically, and only do the special cases by hand.
This looks cumbersome to me. If you reworked the interface (perhaps
using dicts or a generic function) it might get clearer.
Regards,
Björn
--
BOFH excuse #241:
_Rosin_ core solder? But...
--
http://mail.python.org/mailman/listinfo/python-list