On 4/22/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
>
> > It's an interesting idea; it's been brought up before but nobody AFAIK
> > has ever implemented it. I like the scoping requirement.
>
> can we add support for XML literals while we're at it?
>
> http://effbot.org/zone/idea-xml-literal.htm
Javascript has an ECMA standardized extension that supports this
(ECMA-357 or E4X).
Groovy has a different approach that doesn't blend the two syntaxes,
but rather gives you more native syntax for constructing DOM trees (or
event streams; it wasn't clear from the description I saw today). That
makes perhaps more sense; it avoids the lexical ambiguities and a
parentheses-based syntax is easier to type than XML. Maybe this
example (which I am making up) suffices:
frag1 = element["some content"]
frag2 = element["some content",
child(attribute='value')["spam & egg"]]
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com