[melbourne-pug] dicts not always printing (and thus processing) in the same order they were created in (or, Im doing it WRONG ????)

David Crisp dcrisp at netspace.net.au
Fri Mar 14 00:36:05 CET 2014


Thanks Ben,

I suspected I was doing it wrong.

On Fri, 14 Mar 2014, Ben Finney wrote:

>> If thats the wrong way of doing it,  what would be the correct way of
>> doing it?
>
> Either re-visit what you want to do in your code – you quite likely can
> write it so that it's not dependent on the order of items – or you use a
> different type.
>
> So, what is it you're actually needing to do, and why is the order of
> items relevant?

I am processing a set of data in row(parrellel) format that needs to be 
tossed into EAV (serialised) format.  The database it is goign into is a 
long existing system which cant be changed.

I am reading the ROW in, placing it in a container and then later writing 
that row out in the same order it got loaded in on.  THis order creates 
the EAV rows in their correct order.   If the data goes out in a different 
order to when it came in then the EAV rows are written in the incorrect 
order and the data goes bad.




More information about the melbourne-pug mailing list