The base class containing common functionality for all subclasses
representing various network address types.
It is a fully functioning class (as opposed to a virtual class) with a
heuristic constructor that detects the type of address via the first
argument if it is a string and sets itself up accordingly. If the first
argument is an integer, then a constant must be provided via the second
argument indicating the address type explicitly.
Objects of this class behave differently dependent upon the type of
address they represent.
|
|
|
|
|
__int__(self)
Returns:
The value of this address as an network byte order integer. |
source code
|
|
|
__long__(self)
Returns:
The value of this address as an network byte order integer. |
source code
|
|
|
__str__(self)
Returns:
The common string representation for this address type. |
source code
|
|
|
__repr__(self)
Returns:
An executable Python statement that can recreate an object with an
equivalent state. |
source code
|
|
|
bits(self)
Returns:
A human-readable binary digit string for this address type. |
source code
|
|
|
|
|
|
|
|
|
__setitem__(self,
index,
value)
Sets the value of the word of this address indicated by index. |
source code
|
|
|
__hex__(self)
Returns:
The value of this address as a network byte order hexadecimal number. |
source code
|
|
|
|
|
|
|
__eq__(self,
other)
Returns:
True if this network address instance has the same
numerical value as another, False otherwise. |
source code
|
|
|
__lt__(self,
other)
Returns:
True if this network address instance has a lower
numerical value than another, False otherwise. |
source code
|
|
|
__le__(self,
other)
Returns:
True if this network address instance has a lower or
equivalent numerical value than another, False
otherwise. |
source code
|
|
|
__gt__(self,
other)
Returns:
True if this network address instance has a higher
numerical value than another, False otherwise. |
source code
|
|
|
__ge__(self,
other)
Returns:
True if this network address instance has a higher or
equivalent numerical value than another, False
otherwise. |
source code
|
|
|
family(self)
Returns:
The integer constant identifying this object's address type. |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__
|