Created
September 7, 2011 09:58
-
-
Save quiver/1200188 to your computer and use it in GitHub Desktop.
Py-StackExchange issue#8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/stackexchange/__init__.py b/stackexchange/__init__.py | |
index c257838..32e3fb7 100644 | |
--- a/stackexchange/__init__.py | |
+++ b/stackexchange/__init__.py | |
@@ -542,7 +542,7 @@ through here.""" | |
try: | |
if isinstance(ob, datetime.datetime): | |
return str(time.mktime(ob.timetuple())) | |
- elif isinstance(ob, str): | |
+ elif isinstance(ob, basestring): | |
return ob | |
else: | |
i = iter(ob) | |
@@ -611,7 +611,7 @@ through here.""" | |
return ';'.join([self.vectorise(x, or_of_type) for x in lst]) | |
elif allowed_types is not None and any([isinstance(lst, typ) for typ in allowed_types]) and hasattr(lst, 'id'): | |
return str(lst.id) | |
- elif isinstance(lst, str): | |
+ elif isinstance(lst, basestring): | |
return lst | |
else: | |
return str(lst).lower() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment