# marshal works better on 3.x, one hack less required
-if sys.version_info > (3, 0):
+if sys.version_info[0] > 3:
from io import BytesIO
marshal_dump = marshal.dump
marshal_load = marshal.load
# doctests will not run on python 3 currently. Too many issues
# with that, do not test that on that platform.
- if sys.version_info < (3, 0):
+ if sys.version_info[0] < 3:
suite.addTest(doctests.suite())
return suite
# how does a string look like in jinja syntax?
-if sys.version_info < (3, 0):
+if sys.version_info[0] < 3:
def jinja_string_repr(string):
return repr(string)[1:]
else:
# This is used in a couple of places. As far as Jinja is concerned
# filenames are unicode *or* bytestrings in 2.x and unicode only in
# 3.x because compile cannot handle bytes
-if sys.version_info < (3, 0):
+if sys.version_info[0] < 3:
def _encode_filename(filename):
if isinstance(filename, unicode):
return filename.encode('utf-8')