[OT] code is data
Laurent Pointal
laurent.pointal at limsi.fr
Tue Jun 20 03:46:44 EDT 2006
Fredrik Lundh a écrit :
> Laurent Pointal wrote:
>
>>>> The idea is to have a way to transform a Python (.py) module into XML
>>>> and then do source code manipulations in XML-space using ElementTree.
>>>
>>> My my my... I'm not against the idea of dynamic source code
>>> transformation, but for heaven's sake, *why* would one put XML in the
>>> mix ???????
>
> because lots of people know how to describe XML transformations, and
> there are plenty of tools that implement such transformations efficiently ?
>
>> Because its "à la mode", and is better for a commercial point of view,
>> even if inefficient for this problem.
>
> why would XML be inefficient ?
As a storage tool, its nice, and as you says, there are many tools to
deal with.
But as an internal representation for an AST, I certainly prefer an
ad-hoc classes definitions with well defined members.
Just have a wrapper between both representations.
Laurent
A+
More information about the Python-list
mailing list