mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
UserString.MutableString has been removed in Python 3.0.
Works on issue #2877. Thanks Quentin Gallet-Gilles for the patch.
This commit is contained in:
parent
5ec330cb2f
commit
abb34fe9f3
5 changed files with 22 additions and 2 deletions
|
@ -146,6 +146,9 @@ class MutableString(UserString, collections.MutableSequence):
|
|||
|
||||
A faster and better solution is to rewrite your program using lists."""
|
||||
def __init__(self, string=""):
|
||||
from warnings import warnpy3k
|
||||
warnpy3k('the class UserString.MutableString has been removed in '
|
||||
'Python 3.0', stacklevel=2)
|
||||
self.data = string
|
||||
def __hash__(self):
|
||||
raise TypeError, "unhashable type (it is mutable)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue