Proposal for new operators to python that add syntactic sugar for hierarcical data.
Scott David Daniels
scott.daniels at acm.org
Wed May 17 20:15:14 EDT 2006
glomde wrote:
> i I would like to extend python so that you could create hiercical
> tree structures (XML, HTML etc) easier ...
> With syntactical sugar:
>
> # build a tree structure
> root = ET.Element("html")
> *!*root:
> *!*head("head"):
> *!*title("title):
> *=*text = "Page Title"
> *!*body("body"):
> *=*bgcolor = "#ffffff"
> *=*text = "Hello, World!"
Hunt up PyYAML. It might be what you want.
--Scott David Daniels
scott.daniels at acm.org
More information about the Python-list
mailing list