[tor-bugs] #26432 [Core Tor/Stem]: Allow LinkProtocol to be compared directly against integers
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Jun 20 19:37:38 UTC 2018
#26432: Allow LinkProtocol to be compared directly against integers
-------------------------------+-------------------------
Reporter: dmr | Owner: atagar
Type: enhancement | Status: new
Priority: Low | Milestone:
Component: Core Tor/Stem | Version:
Severity: Trivial | Keywords: client easy
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-------------------------------+-------------------------
From [ticket: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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26432>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list