Skip to content

Instantly share code, notes, and snippets.

@quiver
Created September 7, 2011 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quiver/1200188 to your computer and use it in GitHub Desktop.
Save quiver/1200188 to your computer and use it in GitHub Desktop.
Py-StackExchange issue#8
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