Why can’t I sort a list of dicts in 3.x? Why do I get “TypeError: ‘
Python 2’s dictionary sort order was quite involved and poorly understood. It only happened to work because Python 2 tried to make everything orderable. For your specific case, with {‘name’: …} dictionaries with a single key, the ordering was determined by the value for that single key. In Python 3, where dictionaries are no longer … Read more