diff mercurial/util.py @ 30031:0f6d6fdd3c2a

pycompat: provide 'ispy3' constant We compare version_info at several places, which seems enough to define a constant.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 28 Sep 2016 20:01:23 +0900
parents 73b1c328a7da
children 3f4e1c033f40
line wrap: on
line diff
--- a/mercurial/util.py	Fri Sep 30 00:27:35 2016 +0200
+++ b/mercurial/util.py	Wed Sep 28 20:01:23 2016 +0900
@@ -232,7 +232,7 @@
 try:
     buffer = buffer
 except NameError:
-    if sys.version_info[0] < 3:
+    if not pycompat.ispy3:
         def buffer(sliceable, offset=0):
             return sliceable[offset:]
     else: