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.
On Wednesday, 22 August 2012 15:37:23 UTC+1, Simon Sapin wrote: > > Le 22/08/2012 13:27, Sam Pepler a �crit : > > Player and p both look right when I print them, but the if statement > > will not trigger. Any ideas? player and p are objects of the same type. > > Nothing specific to Jinja here, it only uses Python�s == operator. > > What is the type of these objects? Does the type have an __eq__ method? > How are GAME.player and player obtained? > > -- > Simon Sapin > -- You received this message because you are subscribed to the Google Groups "pocoo-libs" group. To view this discussion on the web visit https://groups.google.com/d/msg/pocoo-libs/-/aG6k8UEM6KYJ. 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.
