Clarify
This commit is contained in:
parent
df1d75d181
commit
fc8226e868
|
@ -124,13 +124,13 @@ in some arbitrary order.
|
||||||
**Dictionaries.** A `Dictionary` encodes as tag `0xAA` followed by the
|
**Dictionaries.** A `Dictionary` encodes as tag `0xAA` followed by the
|
||||||
length-prefixed keys and values, in an alternating key/value sequence.
|
length-prefixed keys and values, in an alternating key/value sequence.
|
||||||
|
|
||||||
There is *no* ordering requirement on the elements of sets or the
|
There is *no* ordering requirement on the elements of sets or the key/value pairs of
|
||||||
key/value pairs of dictionaries.[^no-sorting-rationale] However,
|
dictionaries.[^no-sorting-rationale] However, elements of sets and keys in dictionaries *MUST*
|
||||||
elements of sets and keys in dictionaries *MUST* be pairwise distinct.
|
be pairwise distinct. In addition, implementations *SHOULD* default to writing set elements in
|
||||||
In addition, implementations *SHOULD* default to writing set elements
|
order sorted lexicographically by their `Repr`s and *SHOULD* default to writing dictionary
|
||||||
and dictionary key/value pairs in order sorted lexicographically by
|
key/value pairs in order sorted lexicographically by the `Repr`s of their
|
||||||
their `Repr`s[^not-sorted-semantically], and *MAY* offer the option of
|
keys[^not-sorted-semantically]. Implementations *MAY* offer the option of serializing in some
|
||||||
serializing in some other implementation-defined order.
|
other implementation-defined order.
|
||||||
|
|
||||||
[^no-sorting-rationale]: In the BitTorrent encoding format,
|
[^no-sorting-rationale]: In the BitTorrent encoding format,
|
||||||
[bencoding](http://www.bittorrent.org/beps/bep_0003.html#bencoding),
|
[bencoding](http://www.bittorrent.org/beps/bep_0003.html#bencoding),
|
||||||
|
|
Loading…
Reference in New Issue