summaryrefslogtreecommitdiffstats
path: root/Lib/UserString.py
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2004-06-04 03:18:12 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2004-06-04 03:18:12 (GMT)
commit5f5125997beba34f79faa0751c6fa1fa74d97ae2 (patch)
tree1042d481bc2d29356afc29dd7f16c81c7aee7b32 /Lib/UserString.py
parent0701bd64aaf5eacafa7b18f0e67273ed75943a8b (diff)
downloadcpython-5f5125997beba34f79faa0751c6fa1fa74d97ae2.zip
cpython-5f5125997beba34f79faa0751c6fa1fa74d97ae2.tar.gz
cpython-5f5125997beba34f79faa0751c6fa1fa74d97ae2.tar.bz2
Add iswide() and width() method for UserString according as the
addition to unicode objects.
Diffstat (limited to 'Lib/UserString.py')
-rwxr-xr-xLib/UserString.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py
index e8e0fed..914f3ce 100755
--- a/Lib/UserString.py
+++ b/Lib/UserString.py
@@ -126,6 +126,10 @@ class UserString:
def upper(self): return self.__class__(self.data.upper())
def zfill(self, width): return self.__class__(self.data.zfill(width))
+ # the following methods are defined for unicode objects only:
+ def iswide(self): return self.data.iswide()
+ def width(self): return self.data.width()
+
class MutableString(UserString):
"""mutable string objects