Skip to content

Commit 6838c55

Browse files
committed
Add comments for unicode-only methods to give hints on AttributeError
tracebacks. (Suggested by Walter Dörwald)
1 parent 7bd8606 commit 6838c55

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/UserString.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ def upper(self): return self.__class__(self.data.upper())
127127
def zfill(self, width): return self.__class__(self.data.zfill(width))
128128

129129
# the following methods are defined for unicode objects only:
130-
def iswide(self): return self.data.iswide()
131-
def width(self): return self.data.width()
130+
def iswide(self): return self.data.iswide() # unicode only
131+
def width(self): return self.data.width() # unicode only
132132

133133
class MutableString(UserString):
134134
"""mutable string objects

0 commit comments

Comments
 (0)