From: Don Spaulding <firstname.lastname@example.org>
Cc: python-ideas <email@example.com>
Sent: Wednesday, May 15, 2013 1:36 PM
Subject: Re: [Python-ideas] Let's be more orderly!
On Wed, May 15, 2013 at 3:01 PM, <firstname.lastname@example.org> wrote:
Hang on, what?
Now, maybe that's true of your _particular_ XML spec. And this certainly
seems symptomatic of a larger problem (e.g. firing off an event as soon
as the action tag closes, rather than parsing the whole document). But
XML elements are _not_ unordered.Hmm, when I ran across this particular problem, I recall seeing somewhere that the preservation of element order in the spec is undefined. And indeed it appears that while attributes are called explicitly as not having significant order, the spec doesn't actually weigh in on element order one way or another. However, regardless of what's in the spec, it would seem that everyone just assumes element order to be significant anyway, so it doesn't really matter.
On Wed, May 15, 2013, at 15:35, Don Spaulding wrote:
> now I've encountered poorly-written web services that have choked on
> something like:
> ...with an error to the effect of "Cannot modifyStuff without specifying
> user credentials". So someone else has built a system around an XML
> that doesn't know that sibling elements aren't guaranteed to appear in
> particular order.
(top-posted because my reply and your message aren't guaranteed to
appear in any particular order.)>>> OrderedDict(I='see', what='you', did='there')
OrderedDict([('did', 'there'), ('I', 'see'), ('what', 'you')])
Python-ideas mailing list