RunestoneInteractive / fopp

Foundations of Python Programming
https://runestone.academy/runestone/static/fopp/index.html
37 stars 120 forks source link

small typo in foundation of python programming #232

Closed f4-u57 closed 5 years ago

f4-u57 commented 5 years ago

The text before Checking Your Understanding.

Eventually, you will be able to read code like that and immediately know what it’s doing. For now, when you come across something confusing, like line 11, try breaking it down. The function sorted is invoked. Its first parameter value is a dictionary, which really means the keys of the dictionary. The third parameter, the key function, decorates the dictionary key with a post-it note containing that key’s value in dictionary d. The last parameter, True, says to sort in reverse order.

Isn't the bold text suppose to be The second parameter? Since we are talking about this code:

sorted(d, key=lambda k: d[k], reverse=True)

https://runestone.academy/runestone/static/fopp/Sorting/SortingaDictionary.html