Re: Whats the point of having dicts in templates if one cannot access them by key?
On Tue, 13 Nov 2012 20:40:20 -0800 (PST), Juan Pablo Tamayo
<jtamayoh@gmail.com> declaimed the following in
gmane.comp.python.django.user:
> Let me explain, I have a nested dictionary like:
<snip>
> But, whats the point of using dicts if I have to access the values in
> whatever order the <Dict>.items() gives me the keys and values?
>
By DEFINITION a dictionary is UNORDERED.
> What if I need to access these values in a specified order? (for the outer
> dict AND the inner ones)
>
> Is there a way to access a two-dimensional container IN AN PRE-SPECIFIED
> ORDER?
>
Uhm, convert it into a sorted list of sorted lists?
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home