Skip to content

OUI hashability #224

@amitmi704

Description

@amitmi704

Summary

OUI does not have a __hash__ function. This prevents the use of OUI for keys.

  • Python Hash documentation link

Example - Break

from netaddr import OUI

a = OUI("002272")

try:
    set(a)
except TypeError:
    print("Hash failed")

Example - Fix

from netaddr import OUI

a = OUI("002272")
set(a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions