[tor-bugs] #6445 [Tor Relay]: Version spec revisions
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Mon Jul 23 16:21:53 UTC 2012
#6445: Version spec revisions
-------------------------+--------------------------------------------------
Reporter: atagar | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone:
Component: Tor Relay | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by nickm):
Argh. Sorry; it didn't occur to me you didn't know strcmp.
Let me try again.
Suppose you have sequences of elements. Suppose that those elements
themselves have an ordering defined on them.
To lexically compare two sequences, consider their elements pairwise,
starting with the first element of each, then the second, then the third,
and so on.
If you find a pair of elements that are not equal, then the sequence
containing the earlier element is lexically earlier. If you run out of
elements in one sequence but not in the other, then the one in which you
ran out of elements first is earlier. Otherwise, the sequences are
identical.
This is what Python does with two byte sequences when you compare them
with cmp or < or so on. Basically, it is the same as alphabetical order,
except that properly speaking ascii isn't an alphabet.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6445#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list