Commits

Jonathan Eunice committed 1238ec9

Re now auto stringifies, if need be

Comments (0)

Files changed (1)

 # import six
 import copy
 
+if sys.version_info[0] > 2:
+    unicode = str
+
 class IntensionalSet(object):
     """
     An intensional set (actually, an intensionally defined set) is a set
         return result
 
     def __contains__(self, item):
-        # if not isinstance(item, basestring):
-        #     item = str(item)
+        if not isinstance(item, (str, unicode)):
+             item = str(item)
         return self._regroup(self.re.search(item))
     
     ### methods that return ReMatch objects