Commit bc4ae58e authored by Robert Bradshaw's avatar Robert Bradshaw

More cleanup.

parent 82e48d3a
......@@ -2,11 +2,7 @@ import cython
from Cython import __version__
import re, os, sys, time
try:
from glob import iglob
except ImportError:
# Py2.4
from glob import glob as iglob
from glob import iglob
try:
import gzip
......
......@@ -9202,7 +9202,7 @@ class AddNode(NumBinopNode):
def infer_builtin_types_operation(self, type1, type2):
# b'abc' + 'abc' raises an exception in Py3,
# so we can safely infer the Py2 type for bytes here
string_types = [bytes_type, str_type, basestring_type, unicode_type] # Py2.4 lacks tuple.index()
string_types = (bytes_type, str_type, basestring_type, unicode_type)
if type1 in string_types and type2 in string_types:
return string_types[max(string_types.index(type1),
string_types.index(type2))]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment