From 6084d00067c337652df08dd223d8792b6a141a6b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 23 Sep 2003 15:53:04 +0000 Subject: [PATCH] Added __slots__ to IrcDict and IrcSet for optimization purposes. --- src/ircutils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ircutils.py b/src/ircutils.py index a516f59b2..25e6b5389 100644 --- a/src/ircutils.py +++ b/src/ircutils.py @@ -334,6 +334,7 @@ class IrcString(str): class IrcDict(dict): """Subclass of dict to make key comparison IRC-case insensitive.""" + __slots__ = () def __contains__(self, s): return dict.__contains__(self, IrcString(s)) has_key = __contains__ @@ -348,6 +349,7 @@ class IrcDict(dict): dict.__delitem__(self, IrcString(s)) class IrcSet(sets.Set): + __slots__ = () def add(self, s): return sets.Set.add(self, IrcString(s))