DanielStutzbach / blist

A list-like type with better asymptotic performance and similar performance on small lists
Other
310 stars 36 forks source link

add note to doc to clarify sorteddict key must be positional #45

Closed ghost closed 11 years ago

ghost commented 11 years ago

Unlike the rest of the blist API, you cannot pass a custom key function to the sorteddict constructor using a keyword argument. It fails because it takes key to be an item in the dict: sorteddict(key=str.lower)

The example of correct usage, sorteddict(str.lower), is mentioned in the docs. But the doc does not say that the key must always be positional and never specified as a keyword. I would suggest adding a note to that effect.