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
Many classes have a type schema that validates constructor params. Currently a lot of these validate strings against str, which in python 2 means that unicode strings are not allowed. Most of the time there is not a good reason to disallow unicode strings.
In python 2 the basestring type can be used to check if a string is either str or unicode. For python 3, basesting can be used via from past.builtins import basestring.
The text was updated successfully, but these errors were encountered:
Many classes have a type schema that validates constructor params. Currently a lot of these validate strings against
str
, which in python 2 means that unicode strings are not allowed. Most of the time there is not a good reason to disallow unicode strings.In python 2 the
basestring
type can be used to check if a string is eitherstr
orunicode
. For python 3,basesting
can be used viafrom past.builtins import basestring
.The text was updated successfully, but these errors were encountered: