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

bruno at modulix onurb at xiludom.gro
Thu May 18 07:27:20 EDT 2006


glomde wrote:
>>What about using <XXX>data</XXX> for nodes and '=' for attributes ?
>>Would look like:
>>
>><html>
>>  <head>
>>    <title>Page Title</title>
>>  </head>
>>  <body bgcolor='#ffffff'>
>>    Hello World
>>  </body>
>></html>
>>
>>>I think that with the added syntax you get better view of the html
>>>page.
>>
>>indeed !-)
> 
> 
> I dont think it is very pythonic :-). 

Adding ugly and unintuitive "operators" to try to turn a general purpose
programming language into a half-backed unusable HTML templating
language is of course *much* more pythonic...

I think you would have much more success trying to get this added to
Perl !-)

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list