diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2004-06-04 04:23:29 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2004-06-04 04:23:29 (GMT) |
commit | 6838c557faaffc9fb54091dd3fa8e37ca70ab069 (patch) | |
tree | d6cb44bcb067c198f3e5d524794a10ada9e35ccd | |
parent | 7bd860655f8343fe02439a457bc59f7cd7d9eda8 (diff) | |
download | cpython-6838c557faaffc9fb54091dd3fa8e37ca70ab069.zip cpython-6838c557faaffc9fb54091dd3fa8e37ca70ab069.tar.gz cpython-6838c557faaffc9fb54091dd3fa8e37ca70ab069.tar.bz2 |
Add comments for unicode-only methods to give hints on AttributeError
tracebacks. (Suggested by Walter Dörwald)
-rwxr-xr-x | Lib/UserString.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py index 914f3ce..1f1e87c 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 |