mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Added an assert.
This commit is contained in:
parent
a12c4200ac
commit
c1f88120f0
@ -365,6 +365,8 @@ def unDccIP(i):
|
|||||||
class IrcString(str):
|
class IrcString(str):
|
||||||
"""This class does case-insensitive comparison and hashing of nicks."""
|
"""This class does case-insensitive comparison and hashing of nicks."""
|
||||||
def __init__(self, s):
|
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.
|
str.__init__(self, intern(s)) # This does nothing, I fear.
|
||||||
self.lowered = toLower(s)
|
self.lowered = toLower(s)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user