mirror of
https://github.com/python/cpython.git
synced 2025-09-12 03:37:09 +00:00
Add comments for unicode-only methods to give hints on AttributeError
tracebacks. (Suggested by Walter Dörwald)
This commit is contained in:
parent
7bd860655f
commit
6838c557fa
1 changed files with 2 additions and 2 deletions
|
@ -127,8 +127,8 @@ class UserString:
|
||||||
def zfill(self, width): return self.__class__(self.data.zfill(width))
|
def zfill(self, width): return self.__class__(self.data.zfill(width))
|
||||||
|
|
||||||
# the following methods are defined for unicode objects only:
|
# the following methods are defined for unicode objects only:
|
||||||
def iswide(self): return self.data.iswide()
|
def iswide(self): return self.data.iswide() # unicode only
|
||||||
def width(self): return self.data.width()
|
def width(self): return self.data.width() # unicode only
|
||||||
|
|
||||||
class MutableString(UserString):
|
class MutableString(UserString):
|
||||||
"""mutable string objects
|
"""mutable string objects
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue