From: Hye-Shik Chang Date: Fri, 4 Jun 2004 04:23:29 +0000 (+0000) Subject: Add comments for unicode-only methods to give hints on AttributeError X-Git-Tag: v2.4a1~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6838c557faaffc9fb54091dd3fa8e37ca70ab069;p=python Add comments for unicode-only methods to give hints on AttributeError tracebacks. (Suggested by Walter Dörwald) --- diff --git a/Lib/UserString.py b/Lib/UserString.py index 914f3ce14a..1f1e87c499 100755 --- a/Lib/UserString.py +++ b/Lib/UserString.py @@ -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