diff options
author | Raymond Hettinger <python@rcn.com> | 2003-09-09 01:12:18 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-09-09 01:12:18 (GMT) |
commit | 74923d73ee43a857f8eaf541665b585b7d3753f6 (patch) | |
tree | 272a0303580a62880334f1a6b9e738cd790401dc /Doc/lib/libfuncs.tex | |
parent | a098b33c9346ae8c8891982cd733d5d9dcdae2ec (diff) | |
download | cpython-74923d73ee43a857f8eaf541665b585b7d3753f6.zip cpython-74923d73ee43a857f8eaf541665b585b7d3753f6.tar.gz cpython-74923d73ee43a857f8eaf541665b585b7d3753f6.tar.bz2 |
SF bug #560286: Add docs for 'basestring'
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r-- | Doc/lib/libfuncs.tex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index b70433e..eeb3be8 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -80,6 +80,15 @@ def my_import(name): above.} \end{funcdesc} +\begin{funcdesc}{basestring}{} + This abstract type is the superclass for \class{str} and \class{unicode}. + It cannot be called or instantiated, but it can be used to test whether + an object is an instance of \class{str} or \class{unicode}. + \code{isinstance(obj, basestring)} is equivalent to + \code{isinstance(obj, (str, unicode))}. + \versionadded{2.3} +\end{funcdesc} + \begin{funcdesc}{bool}{\optional{x}} Convert a value to a Boolean, using the standard truth testing procedure. If \code{x} is false, this returns \code{False}; |