Created
December 30, 2014 06:21
-
-
Save deloschang/82c06a8540f425892dfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Pdb) master_cb | |
{'solar.Quote': [{'fx': 'solve', 'priority': 1}], 'system.System': [], 'system.Array': [{'fx': 'map_generation', 'priority': 10}]} | |
Extract callback and sort | |
res = [(k, x) for k,v in master_cb.items() for x in v] | |
res.sort(key=lambda x: x[1]['priority'], reverse=True) | |
(Pdb) res | |
[('system.Array', {'fx': 'map_generation', 'priority': 10}), ('solar.Quote', {'fx': 'solve', 'priority': 1})] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment