[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #26432 [Core Tor/Stem]: Allow LinkProtocol to be compared directly against integers
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs