Added an assert.

This commit is contained in:
Jeremy Fincher 2003-12-16 18:14:48 +00:00
parent a12c4200ac
commit c1f88120f0

View File

@ -365,6 +365,8 @@ def unDccIP(i):
class IrcString(str):
"""This class does case-insensitive comparison and hashing of nicks."""
def __init__(self, s):
assert isinstance(s, basestring), \
'Cannot make an IrcString from %s' % type(s)
str.__init__(self, intern(s)) # This does nothing, I fear.
self.lowered = toLower(s)