Package netaddr :: Module address :: Class PrefixLenDescriptor |
[frames] | no frames]

# Class PrefixLenDescriptor

source code

    object --+
             |
            PrefixLenDescriptor

A descriptor that checks prefixlen property assignments for validity based on address type. Also accepts netmasks and hostmasks which can easily be converted to the equivalent prefixlen integer.

Instance Methods
__init__(self, class_id=None) 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, class_id=None) (Constructor) | source code
Constructor. Parameters: `class_id` - (optional) the name of the class that uses this descriptor. Overrides: object.__init__