Package netaddr :: Module address :: Class AddrValueDescriptor
[hide private]
[frames] | no frames]

Class AddrValueDescriptor

source code

object --+
         |
        AddrValueDescriptor

A descriptor that checks assignments to the named parameter passed to the constructor.

It accepts network addresses in either strings format or as unsigned integers. String based addresses are converted to their integer equivalents before assignment to the named parameter. Also ensures that addr_type and strategy are set correctly when parsing string based addresses.

Instance Methods [hide private]
 
__init__(self, name)
Descriptor constructor.
source code
 
__set__(self, instance, value) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

source code 

Descriptor constructor.

Parameters:
  • name - the name of attribute which will be assigned the value.
Overrides: object.__init__