diff options
author | Fred Drake <fdrake@acm.org> | 2001-10-26 18:37:27 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-10-26 18:37:27 (GMT) |
commit | d5be3b75dd7e73ab7bd01f4d0c0c54a189b3c12c (patch) | |
tree | eb3c146923aa87b719366608c2164e7d5f4565e2 /Doc | |
parent | 5445f078df1dc986259f75f6345afea19b27cb59 (diff) | |
download | cpython-d5be3b75dd7e73ab7bd01f4d0c0c54a189b3c12c.zip cpython-d5be3b75dd7e73ab7bd01f4d0c0c54a189b3c12c.tar.gz cpython-d5be3b75dd7e73ab7bd01f4d0c0c54a189b3c12c.tar.bz2 |
Add notes pointing out that these classes are kept for backward compatibility
and suggeest that new code that does not require compatibility with older
Python versions subclass dictionary, list, or str.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libuserdict.tex | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/lib/libuserdict.tex b/Doc/lib/libuserdict.tex index 0285380..7e6d666 100644 --- a/Doc/lib/libuserdict.tex +++ b/Doc/lib/libuserdict.tex @@ -4,6 +4,11 @@ \declaremodule{standard}{UserDict} \modulesynopsis{Class wrapper for dictionary objects.} +\note{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 \class{dictionary} type.} + This module defines a class that acts as a wrapper around dictionary objects. It is a useful base class for your own dictionary-like classes, which can inherit from @@ -38,6 +43,11 @@ class. \modulesynopsis{Class wrapper for list objects.} +\note{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 \class{list} type.} + This module defines a class that acts as a wrapper around list objects. It is a useful base class for your own list-like classes, which can inherit from @@ -92,6 +102,13 @@ methods which need to be provided in that case. \moduleauthor{Peter Funk}{pf@artcom-gmbh.de} \sectionauthor{Peter Funk}{pf@artcom-gmbh.de} +\note{This \class{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 \class{str} type +instead of using \class{UserString} (there is no built-in equivalent +to \class{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 |