Proposal for new operators to python that add syntactic sugar for hierarcical data.

glomde tbrkic at yahoo.com
Fri May 19 00:28:50 CEST 2006


So I read trough all of the make PEP and make would support the syntax
i propose..
and more generic and better in many ways. Since it was rejected I have
to continue live
with my preprocessor...

>From the make PEP

..... Allowing this sort of customization could allow XML to be written
without repeating element names, and with nesting of make-statements
corresponding to nesting of XML elements:

make Element html:
    make Element body:
        text('before first h1')
        make Element h1:
            attrib(style='first')
            text('first h1')
            tail('after first h1')
        make Element h1:
            attrib(style='second')
            text('second h1')
            tail('after second h1')




More information about the Python-list mailing list