mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Stylistic update; there are things better than lambdas...
This commit is contained in:
parent
28753856eb
commit
c1e9205545
@ -175,7 +175,7 @@ class FunDB(callbacks.Privmsg):
|
|||||||
cursor.execute("""SELECT word FROM words
|
cursor.execute("""SELECT word FROM words
|
||||||
WHERE word LIKE %s
|
WHERE word LIKE %s
|
||||||
ORDER BY word""", word)
|
ORDER BY word""", word)
|
||||||
words = map(lambda t: t[0], cursor.fetchall())
|
words = [t[0] for t in cursor.fetchall()]
|
||||||
irc.reply(msg, ', '.join(words))
|
irc.reply(msg, ', '.join(words))
|
||||||
|
|
||||||
def excuse(self, irc, msg, args):
|
def excuse(self, irc, msg, args):
|
||||||
@ -513,7 +513,7 @@ class FunDB(callbacks.Privmsg):
|
|||||||
WHERE sorted_word_id=(
|
WHERE sorted_word_id=(
|
||||||
SELECT sorted_word_id FROM words
|
SELECT sorted_word_id FROM words
|
||||||
WHERE word=%s)""", word)
|
WHERE word=%s)""", word)
|
||||||
words = map(lambda t: t[0], cursor.fetchall())
|
words = [t[0] for t in cursor.fetchall()]
|
||||||
try:
|
try:
|
||||||
words.remove(word)
|
words.remove(word)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
Reference in New Issue
Block a user