Opened 6 months ago

Closed 4 months ago

#26432 closed enhancement (fixed)

Allow LinkProtocol to be compared directly against integers

Reported by: dmr Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Stem Version:
Severity: Trivial Keywords: client easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

From 26227#comment:8:

All attributes of the LinkProtocol are derived from its integer version, so it would be perfectly fine to do equality and hash on that.

Thus: implement __eq__() (and __ne__()) to allow a LinkProtocol instance to be compared directly against integers.

Child Tickets

Change History (2)

comment:1 Changed 6 months ago by dmr

atagar: leaving this unassigned in case someone wants to pick it up; tagged as easy.

comment:2 Changed 4 months ago by atagar

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.