You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add type check to make sure unidecode is being passed a unicode string #8
@djds23 thanks for bringing this on, it's a good idea imo, please submit the PR if you want.
btw, it has to be compatible with both python2/3, so you could probably set the unicode_type on the module level, and then in unidecode function just check if the passed value is instance of it:
Activity
iki commentedon Jan 12, 2015
@djds23 do you mean a shortcut that returns original string if it is not instance of
unicodeon python2, orstron python3?djds23 commentedon Jan 12, 2015
@iki thanks for asking, I was thinking
unicodein python2iki commentedon Jan 13, 2015
@djds23 thanks for bringing this on, it's a good idea imo, please submit the PR if you want.
btw, it has to be compatible with both python2/3, so you could probably set the unicode_type on the module level, and then in
unidecodefunction just check if the passed value is instance of it: