stuff missing from previous commit, thanks git
diff --git a/jinja2/compiler.py b/jinja2/compiler.py
index c3d84d1..1b1b5a7 100644
--- a/jinja2/compiler.py
+++ b/jinja2/compiler.py
@@ -18,6 +18,7 @@
 import six
 from six.moves import cStringIO as StringIO
 from six.moves import map, zip
+from six.moves import xrange
 
 
 operators = {
@@ -75,11 +76,7 @@
     """Does the node have a safe representation?"""
     if value is None or value is NotImplemented or value is Ellipsis:
         return True
-    try:
-        range_type = xrange
-    except NameError:
-        range_type = range
-    if isinstance(value, (bool, int, float, complex, range_type, Markup) + six.string_types):
+    if isinstance(value, (bool, int, float, complex, xrange, Markup) + six.string_types):
         return True
     if isinstance(value, (tuple, list, set, frozenset)):
         for item in value: