osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?


On 3/21/2019 1:23 PM, Paul Moore wrote:
> On Thu, 21 Mar 2019 at 17:05, Steve Holden <steve at holdenweb.com> wrote:

>> Especially as the standards specifically say that ordering has no semantic impact.
>>
>> Byte-by-byte comparison of XML is almost always inappropriate.
> 
> Conversely, if ordering has no semantic impact, there's no real
> justification for asking for the current order to be changed.
> 
> In practice, allowing the user to control the ordering (by preserving
> input order) gives users a way of handling (according to the standard)
> broken consumers who ascribe semantic meaning to the attribute order.

Or, as Jonathan Goble said elsewhere, use an order that makes whatever 
sense to the author and other readers.  The order of positional 
parameter names in a function definition has no semantic meaning to 
python, but it would be terrible to make them be sorted.

-- 
Terry Jan Reedy