Le 22/08/2012 17:58, Sam Pepler a écrit :
Thanks. That has indirectly sorted it out. I added a __eq__ method and
that rasied an error suggesting one of the objects was a str. This is
because the for loop is over a dictionary and that seems to produce a
list of keys by default. I am now using the dictsort filter to unpack
the values.

In Python, iterating over a dict gives only the keys. You might be interested in the .values() and .items() methods:

http://docs.python.org/library/stdtypes.html#dict

Cheers,
--
Simon Sapin

--
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en.

Reply via email to