~pythonregexp2.7/python/issue2636-12

« back to all changes in this revision

Viewing changes to Doc/library/userdict.rst

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-06-09 14:52:42 UTC
  • mfrom: (39033.1.3 Regexp-2.6)
  • Revision ID: darklord@timehorse.com-20080609145242-9m268zc6u87rp1vp
Merged in changes from the core Regexp branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
   defaulting to the empty list ``[]``.  *list* can be any iterable, e.g. a
101
101
   real Python list or a :class:`UserList` object.
102
102
 
 
103
   .. note::
 
104
      The :class:`UserList` class has been moved to the :mod:`collections`
 
105
      module in Python 3.0. The :term:`2to3` tool will automatically adapt
 
106
      imports when converting your sources to 3.0.
 
107
 
 
108
 
103
109
In addition to supporting the methods and operations of mutable sequences (see
104
110
section :ref:`typesseq`), :class:`UserList` instances provide the following
105
111
attribute:
167
173
   :class:`UserString` (or a subclass) or an arbitrary sequence which can be
168
174
   converted into a string using the built-in :func:`str` function.
169
175
 
 
176
   .. note::
 
177
      The :class:`UserString` class has been moved to the :mod:`collections`
 
178
      module in Python 3.0. The :term:`2to3` tool will automatically adapt
 
179
      imports when converting your sources to 3.0.
 
180
 
 
181
 
170
182
 
171
183
.. class:: MutableString([sequence])
172
184
 
178
190
   mutable object as dictionary key, which would be otherwise very error prone and
179
191
   hard to track down.
180
192
 
 
193
   .. deprecated:: 2.6
 
194
      The :class:`MutableString` class has been removed in Python 3.0.
 
195
 
181
196
In addition to supporting the methods and operations of string and Unicode
182
197
objects (see section :ref:`string-methods`), :class:`UserString` instances
183
198
provide the following attribute: