VirtualMailManager/EmailAddress.py
branchv0.6.x
changeset 213 1a9fee6b93bc
parent 208 efa1327b721f
child 215 33f727efa7c4
equal deleted inserted replaced
212:77ac6f572855 213:1a9fee6b93bc
    21     """Simple class for validated e-mail addresses."""
    21     """Simple class for validated e-mail addresses."""
    22     __slots__ = ('_localpart', '_domainname')
    22     __slots__ = ('_localpart', '_domainname')
    23 
    23 
    24     def __init__(self, address):
    24     def __init__(self, address):
    25         """Creates a new instance from the string/unicode ``address``."""
    25         """Creates a new instance from the string/unicode ``address``."""
    26         if not isinstance(address, basestring):
    26         assert isinstance(address, basestring)
    27             raise TypeError('address is not a str/unicode object: %r' %
       
    28                             address)
       
    29         self._localpart = None
    27         self._localpart = None
    30         self._domainname = None
    28         self._domainname = None
    31         self._chk_address(address)
    29         self._chk_address(address)
    32 
    30 
    33     @property
    31     @property