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

Noon Silk noonslists at gmail.com
Fri Mar 14 01:30:49 CET 2014


It'd be pretty fun to have a mode for the interpreter such that, if, when a
particular property was 'undefined', the implementation did it's best to
make sure it was a undefined as possible.



On Fri, Mar 14, 2014 at 11:27 AM, David Crisp <dcrisp at netspace.net.au>wrote:

> Thanks everyone,
>
> I have examined the way I was writing my code and .. Bulk deleted the
> entire block that was causing the problem with the intention of re-writing
> it! :)
>
> Okay:  SO i had a look at what I was doing and realsied it was slightly
> regressive so I am having another look at my structure!
>
> Regards,
> David Crisp
>
>
>
>
> On Fri, 14 Mar 2014, Javier Candeira wrote:
>
>  On Fri, Mar 14, 2014 at 10:31 AM, Jason King <pizza at netspace.net.au>
>> wrote:
>>
>>  yup, associative arrays , (in awk), dicts in python , and the perl
>>> version
>>> of them are all like this, you can't specify the order in which the
>>> contents are output.
>>>
>>> There is an OrderedDict (http://docs.python.org/2/
>>> library/collections.html#collections.OrderedDict)
>>> if insertion order is important to you.
>>>
>>
>>
>> And, to add to Jason's Rosetta Stone of mappings, I believe Ruby hashes
>> (which is the name dicts have in that faraway land) are always ordered, at
>> least from 1.9 onwards.
>>
>> J
>>
>>  _______________________________________________
> melbourne-pug mailing list
> melbourne-pug at python.org
> https://mail.python.org/mailman/listinfo/melbourne-pug
>



-- 
Noon Silk

Fancy a quantum lunch? https://sites.google.com/site/quantumlunch/

"Every morning when I wake up, I experience an exquisite joy -- the joy
of being this signature."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/melbourne-pug/attachments/20140314/8375069c/attachment-0001.html>


More information about the melbourne-pug mailing list