mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Import imap directly from itertools instead of utils.iter.
This commit is contained in:
parent
d52e501ae8
commit
1cb657ddb2
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
|
from itertools import imap
|
||||||
|
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
from supybot.commands import *
|
from supybot.commands import *
|
||||||
@ -61,7 +62,7 @@ class Games(callbacks.Plugin):
|
|||||||
For example, 2d6 will roll 2 six-sided dice; 10d10 will roll 10
|
For example, 2d6 will roll 2 six-sided dice; 10d10 will roll 10
|
||||||
ten-sided dice.
|
ten-sided dice.
|
||||||
"""
|
"""
|
||||||
(dice, sides) = utils.iter.imap(int, m.groups())
|
(dice, sides) = imap(int, m.groups())
|
||||||
if dice > 1000:
|
if dice > 1000:
|
||||||
irc.error(_('You can\'t roll more than 1000 dice.'))
|
irc.error(_('You can\'t roll more than 1000 dice.'))
|
||||||
elif sides > 100:
|
elif sides > 100:
|
||||||
|
@ -42,7 +42,7 @@ import supybot.ircmsgs as ircmsgs
|
|||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
from utils.str import rsplit
|
from utils.str import rsplit
|
||||||
from utils.iter import imap, chain, cycle
|
from utils.iter import chain, cycle
|
||||||
from utils.structures import queue, smallqueue, RingBuffer
|
from utils.structures import queue, smallqueue, RingBuffer
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -43,6 +43,7 @@ import textwrap
|
|||||||
from cStringIO import StringIO as sio
|
from cStringIO import StringIO as sio
|
||||||
|
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
|
from itertools import imap
|
||||||
|
|
||||||
def debug(s, *args):
|
def debug(s, *args):
|
||||||
"""Prints a debug string. Most likely replaced by our logging debug."""
|
"""Prints a debug string. Most likely replaced by our logging debug."""
|
||||||
@ -492,7 +493,7 @@ def unDccIP(i):
|
|||||||
L.append(i % 256)
|
L.append(i % 256)
|
||||||
i /= 256
|
i /= 256
|
||||||
L.reverse()
|
L.reverse()
|
||||||
return '.'.join(utils.iter.imap(str, L))
|
return '.'.join(imap(str, L))
|
||||||
|
|
||||||
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."""
|
||||||
|
Loading…
Reference in New Issue
Block a user