Mercurial > cpython-lru_cache-weakref
diff Lib/UserString.py @ 32237:9689da001197 legacy-trunk
Add iswide() and width() method for UserString according as the
addition to unicode objects.
| author | Hye-Shik Chang <hyeshik@gmail.com> |
|---|---|
| date | Fri, 04 Jun 2004 03:18:12 +0000 |
| parents | 02ebe3456595 |
| children | 300db81e2e4a |
line wrap: on
line diff
--- a/Lib/UserString.py Thu Jun 03 21:55:46 2004 +0000 +++ b/Lib/UserString.py Fri Jun 04 03:18:12 2004 +0000 @@ -126,6 +126,10 @@ 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
