sopel-irc / sopel-extras

Broken Sopel modules you might pick up and fix if you want them. Probably faster to just rewrite, though
40 stars 57 forks source link

[twit] Python 2 should use unicode(), not str() #45

Closed dgw closed 10 years ago

dgw commented 10 years ago

The twit module was tripping on users with Unicode characters in their profile data, and Python 2.x distinguishes between str and unicode as different types (yes, yes, upgrade to Py3, etc.).

I think this is a decent way of doing it, but please tell me if there's a better way to fix this and keep compatibility with both Py2 & Py3.

elad661 commented 10 years ago

I merged this but now when I read it again I think overriding str might break things. but, if it works for you I assume it'd work for other people. I don't care much about twit.

dgw commented 10 years ago

If I run into any issues I'll either fix it or revert it with another PR.