Closed GoogleCodeExporter closed 9 years ago
I don't think that's a correct patch, if reversed(self).next() is None then
iter(self).next() will be called.
Original comment by bob%redi...@gtempaccount.com
on 15 May 2009 at 3:38
You are correct - my bad on that.
I guess my intent was to point out that simplejson is using the conditional
expressions introduced in Python 2.5 (PEP 308), but otherwise is 2.4-compatible.
A better fix would be to expand the conditional statement (I know, it would
lose in
golf)...
if last:
key = reversed(self).next()
else:
key = iter(self).next()
Original comment by tzell...@gmail.com
on 15 May 2009 at 4:47
That patch looks better. Note that all *released* versions are still compatible
with 2.4. I'll definitely take this into
consideration and either stop supporting 2.4 for simplejson 2.1+ or make sure
that OrderedDict gets properly
backported. It looks like your fix probably would work, but there could be
other subtleties with 2.4.
Original comment by bob%redi...@gtempaccount.com
on 15 May 2009 at 5:04
also needed to implement all(), r186 r189
Original comment by bob.ippo...@gmail.com
on 17 May 2009 at 6:53
Original issue reported on code.google.com by
tzell...@gmail.com
on 15 May 2009 at 1:04