| [ Web Proxy ] |
| Viewing: https://docs.python.org/2.2/lib/module-UserString.html | [Back] [Original] |
Note: This UserString class from this module is available for backward compatibility only. If you are writing code that does not need to work with versions of Python earlier than Python 2.2, please consider subclassing directly from the built-in str type instead of using UserString (there is no built-in equivalent to MutableString).
This module defines a class that acts as a wrapper around string objects. It is a useful base class for your own string-like classes, which can inherit from them and override existing methods or add new ones. In this way one can add new behaviors to strings.
It should be noted that these classes are highly inefficient compared to real string or Unicode objects; this is especially the case for MutableString.
The UserString module defines the following classes:
In addition to supporting the methods and operations of string and Unicode objects (see section 2.2.6, ``String Methods''), UserString instances provide the following attribute:
| Web Proxy Viewer | New URL | Original Page |