mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
#3310: stop referring to basestring.
This commit is contained in:
parent
6794aa3cb3
commit
01ca04cc49
1 changed files with 2 additions and 3 deletions
|
@ -531,9 +531,8 @@ Python has two builtin functions that work with inheritance:
|
|||
|
||||
* Use :func:`issubclass` to check class inheritance: ``issubclass(bool, int)``
|
||||
is ``True`` since :class:`bool` is a subclass of :class:`int`. However,
|
||||
``issubclass(unicode, str)`` is ``False`` since :class:`unicode` is not a
|
||||
subclass of :class:`str` (they only share a common ancestor,
|
||||
:class:`basestring`).
|
||||
``issubclass(float, int)`` is ``False`` since :class:`float` is not a
|
||||
subclass of :class:`int`.
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue