Package netaddr :: Module address :: Class AddrValueDescriptor |
[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 string format or as network byte order 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
__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
Inherited from `object`: `__class__`

Method Details

### __init__(self, name) (Constructor) | source code
Descriptor constructor. Parameters: `name` - the name of attribute which will be assigned the value. Overrides: object.__init__