Russell Keith-Magee napisaƂ(a):

>>     class Meta:
>>         ordering = ('code')
> 
> You have been bitten by a very common Python error:
> 
> ('code') defines a string
> ('code',) defines a tuple containing a single element, that is a string.

This is how strings works in Python, Ian Bicking even wrote a rant on
this arguing that strings should not be treated as "normal" sequences.

I cann't count how many times I was bitten by this "feature". ;)

-- 
Jarek Zgoda

"We read Knuth so you don't have to."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to