summaryrefslogtreecommitdiff
path: root/jsonpointer.py
diff options
context:
space:
mode:
authorAlexander Shorin <kxepal@gmail.com>2012-09-12 08:34:45 +0400
committerAlexander Shorin <kxepal@gmail.com>2012-09-12 08:34:45 +0400
commitaef6313b049b08f08dd48eb6173fcb1eb63f8bcf (patch)
treefcb411ae0bda6763a4d34a19c84c0735adf1208e /jsonpointer.py
parenta2c3bc2de1a8f315f9b21e0846c17d92864c525c (diff)
downloadpython-json-pointer-aef6313b049b08f08dd48eb6173fcb1eb63f8bcf.tar.gz
Fix compatibility with Python 2.5.
Emulate next(b, None) through for loop with single round. There wasn't print_function, while it really doesn't needed.
Diffstat (limited to 'jsonpointer.py')
-rw-r--r--jsonpointer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/jsonpointer.py b/jsonpointer.py
index 12f3744..06b9869 100644
--- a/jsonpointer.py
+++ b/jsonpointer.py
@@ -217,5 +217,6 @@ class JsonPointer(object):
def pairwise(iterable):
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
a, b = tee(iterable)
- next(b, None)
+ for _ in b:
+ break
return izip(a, b)