Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
    (key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
    d = {}
    for k, v in iterable:
        d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
    in the keyword argument list.  For example:  dict(one=1, two=2)

src/p/y/pyGBot-HEAD/pyGBot/Plugins/games/ApplesToApples.py   pyGBot(Download)
# Import the card lists.
from ApplesCards import GREENCARDS, REDCARDS
# Note: When sending messages, codes such as "\x034" refer to IRC
        # with a short syntax reminder
        self.greencard = self.greendeck.pop(0)
        self.bot.pubout(self.channel, "The new green card is: \x02\x033%s\x0F - %s. Please play cards from your hand using '!play <number>'." % (self.greencard, GREENCARDS[self.greencard]))
    # Check if the round is over
    def beginjudging(self):
        # Reset timer, and remind the judge what the green card is
        self.timer = 0
        self.bot.pubout(self.channel, "Green card is: \x02\x033%s\x0F - %s" % (self.greencard, GREENCARDS[self.greencard]))
        # Shuffle the played cards, and send them out with the card descriptions