]> granicus.if.org Git - python/commitdiff
Add comments for unicode-only methods to give hints on AttributeError
authorHye-Shik Chang <hyeshik@gmail.com>
Fri, 4 Jun 2004 04:23:29 +0000 (04:23 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Fri, 4 Jun 2004 04:23:29 +0000 (04:23 +0000)
tracebacks. (Suggested by Walter Dörwald)

Lib/UserString.py

index 914f3ce14a87456f3cdc6624df399cffdd8d03b0..1f1e87c499c589ea9825716c6ef9f597ed1047ad 100755 (executable)
@@ -127,8 +127,8 @@ class UserString:
     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()
+    def iswide(self): return self.data.iswide() # unicode only
+    def width(self): return self.data.width() # unicode only
 
 class MutableString(UserString):
     """mutable string objects