diff --git a/src/Channel.py b/src/Channel.py index e86953a29..5f9351dd2 100755 --- a/src/Channel.py +++ b/src/Channel.py @@ -435,8 +435,7 @@ class Channel(callbacks.Privmsg): s = 'I\'m not currently ignoring any hostmasks in %r' % channel irc.reply(s) else: - L = c.ignores[:] - L.sort() + L = sorted(c.ignores) irc.reply(utils.commaAndify(imap(repr, L))) ignores = privmsgs.checkChannelCapability(ignores, 'op') @@ -542,8 +541,7 @@ class Channel(callbacks.Privmsg): """ channel = privmsgs.getChannel(msg, args) c = ircdb.channels.getChannel(channel) - L = list(c.capabilities) - L.sort() + L = sorted(c.capabilities) irc.reply('[%s]' % '; '.join(L)) def lobotomies(self, irc, msg, args): diff --git a/src/fix.py b/src/fix.py index 3066fdcc7..409bb2ddb 100644 --- a/src/fix.py +++ b/src/fix.py @@ -168,14 +168,6 @@ def rsplit(s, sep=None, maxsplit=-1): L.reverse() return [s[::-1] for s in L] -def sorted(iterable, cmp=None, key=None, reverse=False): - L = list(iterable) -## if key is None: -## L.sort(cmp) -## else: -## # Oops, we don't have sortBy. Let's come back to this.utils. -## utils.sortBy(key - import operator def itemgetter(i): return lambda x: x[i]