Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3a65f8

Browse files
committed
Move UserString to collections.
Removed decode() method. Added isidentifier() and format() methods. Drop MutableUserString class.
1 parent 6f7140c commit b3a65f8

8 files changed

Lines changed: 167 additions & 400 deletions

File tree

Doc/library/collections.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,3 +706,22 @@ If a derived class does not wish to comply with this requirement, all of the
706706
special methods supported by this class will need to be overridden; please
707707
consult the sources for information about the methods which need to be provided
708708
in that case.
709+
710+
:class:`UserString` objects
711+
-------------------------
712+
713+
The class, :class:`UserString` acts as a wrapper around string objects.
714+
The need for this class has been partially supplanted by the ability to
715+
subclass directly from :class:`str`; however, this class can be easier
716+
to work with because the underlying string is accessible as an
717+
attribute.
718+
719+
.. class:: UserString([sequence])
720+
721+
Class that simulates a string or a Unicode string object. The instance's
722+
content is kept in a regular string object, which is accessible via the
723+
:attr:`data` attribute of :class:`UserString` instances. The instance's
724+
contents are initially set to a copy of *sequence*. The *sequence* can
725+
be an instance of :class:`bytes`, :class:`str`, :class:`UserString` (or a
726+
subclass) or an arbitrary sequence which can be converted into a string using
727+
the built-in :func:`str` function.

Doc/library/datatypes.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ The following modules are documented in this chapter:
2929
mutex.rst
3030
queue.rst
3131
weakref.rst
32-
userdict.rst
3332
types.rst
3433
copy.rst
3534
pprint.rst

Doc/library/userdict.rst

Lines changed: 0 additions & 61 deletions
This file was deleted.

Lib/UserString.py

Lines changed: 0 additions & 244 deletions
This file was deleted.

0 commit comments

Comments
 (0)