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/f/t/ftw.mail-2.1.0/ftw/mail/exceptions.py   ftw.mail(Download)
from ftw.mail.config import EXIT_CODES
 
 
class MailInboundException(Exception):
    """ An exception indicating an error occured while processing
    def __init__(self):
        MailInboundException.__init__(
            self, EXIT_CODES['NOINPUT'], 'No mail message supplied.')
 
 
class InvalidMessage(MailInboundException):
 
    def __init__(self):
        MailInboundException.__init__(
            self, EXIT_CODES['DATAERR'], 'Invalid mail message supplied.')
    def __init__(self, mail):
        self.mail = mail
        MailInboundException.__init__(
            self, EXIT_CODES['NOPERM'], 'Could not extract sender email.')
 
    def __init__(self, mail):
        self.mail = mail
        MailInboundException.__init__(
            self, EXIT_CODES['NOPERM'], 'Unknown sender. Permission denied.')