Package turbomail :: Module util :: Class Address
[hide private]
[frames] | no frames]

Class Address

source code

object --+
         |
        Address

Validated electronic mail address class.

This class knows how to validate and format e-mail addresses. It uses Python's built-in `parseaddr` and `formataddr` helper functions and helps guarantee a uniform base for all e-mail address operations.

The AddressList unit tests provide comprehensive testing of this class as well.

Instance Methods [hide private]
 
__init__(self, name_or_email, email=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__cmp__(self, other) source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
encode(self, encoding='ascii') source code
 
is_valid_address(self, address) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name_or_email, email=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)