[ python-Feature Requests-1143855 ] Python syntax is not so XML
friendly!
SourceForge.net
noreply at sourceforge.net
Fri Feb 18 22:17:29 CET 2005
Feature Requests item #1143855, was opened at 2005-02-18 07:31
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1143855&group_id=5470
>Category: Parser/Compiler
>Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Colbert Philippe (cp1965)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python syntax is not so XML friendly!
Initial Comment:
I want to embed python scripts into XML files. The
problems is depending on the XML readers's
configuration, the space or tab characters might or
might not be eliminated. This is a a serious risk. That is
why I propose that Python/Jython allow for traditional
Java style separators block ({ }). This would be
optional and would improve the flexibility of Python. The
programmer can always choose which style he/she
wants to use.
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2005-02-18 13:17
Message:
Logged In: YES
user_id=357491
First off, this is not a bug and thus should be filed as a feature request.
Second, it will never happen. A key benefit of Python is that it's syntax
does not allow for much flexibility in terms of how to structure your code
syntactically. This makes it quite easy to read someone else's code
regardless of what syntax style they use.
You also have problems with possible ambiguity with dicts.
In other words this is never going to happen simply because it goes
against a basic Python tenant.
Closed as invalid.
----------------------------------------------------------------------
Comment By: Sjoerd Mullender (sjoerd)
Date: 2005-02-18 07:52
Message:
Logged In: YES
user_id=43607
I'm not in charge of the language, but I give you very
little chance that this is accepted.
The XML standard has this to say about white space:
"An XML processor MUST always pass all characters in a
document that are not markup through to the application. A
validating XML processor MUST also inform the application
which of these characters constitute white space appearing
in element content.
A special attribute named xml:space MAY be attached to an
element to signal an intention that in that element, white
space should be preserved by applications. In valid
documents, this attribute, like any other, MUST be declared
if it is used. When declared, it MUST be given as an
enumerated type whose values are one or both of "default"
and "preserve"."
If your XML processor doesn't pass on white space in the
presence of xml:space="preserve" it is in error and you
should complain to there.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1143855&group_id=5470
More information about the Python-bugs-list
mailing list