diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-05-08 18:18:48 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-05-08 18:18:48 +0300 |
commit | b715bfee8f04d7b46fba62ec9d9ab95fe1a61ffd (patch) | |
tree | 1bfa9feced89238e4c1cfa6cad01f098ea33e6dc /simplejson/ordered_dict.py | |
parent | f1a06fc7598f324acee332b02b6ecc43773b7b5d (diff) | |
download | simplejson-b715bfee8f04d7b46fba62ec9d9ab95fe1a61ffd.tar.gz |
Remofe remnants of Python 2.4 support.no-py2.4
Clean up the code by removing workarounds for supporting Python 2.4.
Diffstat (limited to 'simplejson/ordered_dict.py')
-rw-r--r-- | simplejson/ordered_dict.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/simplejson/ordered_dict.py b/simplejson/ordered_dict.py index 87ad888..d5a55eb 100644 --- a/simplejson/ordered_dict.py +++ b/simplejson/ordered_dict.py @@ -5,17 +5,6 @@ http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin -# Modified from original to support Python 2.4, see -# http://code.google.com/p/simplejson/issues/detail?id=53 -try: - all -except NameError: - def all(seq): - for elem in seq: - if not elem: - return False - return True - class OrderedDict(dict, DictMixin): def __init__(self, *args, **kwds): @@ -63,12 +52,7 @@ class OrderedDict(dict, DictMixin): def popitem(self, last=True): if not self: raise KeyError('dictionary is empty') - # Modified from original to support Python 2.4, see - # http://code.google.com/p/simplejson/issues/detail?id=53 - if last: - key = reversed(self).next() - else: - key = iter(self).next() + key = reversed(self).next() if last else iter(self).next() value = self.pop(key) return key, value |