mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Added some __repr__ action.
This commit is contained in:
parent
5f1aa43ee0
commit
934363db10
@ -507,10 +507,16 @@ class IrcSet(utils.NormalizingSet):
|
||||
|
||||
class FloodQueue(object):
|
||||
timeout = 0
|
||||
def __init__(self, timeout=None):
|
||||
def __init__(self, timeout=None, queues=None):
|
||||
if timeout is not None:
|
||||
self.timeout = timeout
|
||||
self.queues = IrcDict()
|
||||
if queues is None:
|
||||
queues = IrcDict()
|
||||
self.queues = queues
|
||||
|
||||
def __repr__(self):
|
||||
return 'FloodQueue(timeout=%r, queues=%s)' % (self.timeout,
|
||||
repr(self.queues))
|
||||
|
||||
def key(self, msg):
|
||||
return msg.user + '@' + msg.host
|
||||
|
@ -651,6 +651,10 @@ class InsensitivePreservingDict(UserDict.DictMixin, object):
|
||||
if dict is not None:
|
||||
self.update(dict)
|
||||
|
||||
def __repr__(self):
|
||||
return '%s(%s)' % (self.__class__.__name__,
|
||||
super(InsensitivePreservingDict, self).__repr__())
|
||||
|
||||
def fromkeys(cls, keys, s=None, dict=None, key=None):
|
||||
d = cls(dict=dict, key=key)
|
||||
for key in keys:
|
||||
|
Loading…
Reference in New Issue
Block a user