mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
Add iswide() and width() method for UserString according as the
addition to unicode objects.
This commit is contained in:
parent
0701bd64aa
commit
5f5125997b
3 changed files with 31 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue