I’m new to Python, and using Google App Engine, which is currently running only Python 2.5. Are there any built-in ways of doing an ordered dictionary, or do I have to implement something custom?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Django provides a SortedDict class, which has the same functionality. If you are using django, you can just use
from django.utils.datastructures import SortedDict.Even if you’re not using django, you can still take advantage of that implementation. Just get the datastructures.py file from the django source and save it somewhere importable.
http://code.djangoproject.com/browser/django/trunk/django/utils/datastructures.py