Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

https://docs.python.org/3.0/whatsnew/3.0.html

> The builtin basestring abstract type was removed. Use str instead. The str 
> and bytes types don’t have functionality enough in common to warrant a shared 
> base class. The 2to3 tool (see below) replaces every occurrence of basestring 
> with str.

For a longer explanation of this and other changes you might find below link 
useful. In Python 2 str is used to represent both text and bytes. Hence to 
check the type is str in python 2 you have to check it to be basestring and 
then check it to be unicode. In python 3 all strings are unicode with str and 
bytes being two different types. Hence there is no basestring and unicode 
string since they are both unified to be str itself in Python 3.

https://portingguide.readthedocs.io/en/latest/strings.html

Hope this helps.

----------
nosy: +xtreak

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38003>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to