equal
deleted
inserted
replaced
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 |