OK no hashable errors anymore

I think I got it working.
This commit is contained in:
Cy 2020-06-01 01:46:32 +00:00 committed by Cy
parent 82b2c9f232
commit 2c8cdac15e
1 changed files with 1 additions and 7 deletions

View File

@ -1,13 +1,7 @@
from pprint import pprint from pprint import pprint
def maketree(descendants): def maketree(descendants):
try: lookup = dict((descendant.id, descendant) for descendant in descendants)
lookup = [(descendant.id, descendant) for descendant in descendants]
print(descendants[0][0])
lookup = dict(descendants)
except:
pprint(lookup)
raise
replies = {} replies = {}
roots = set() roots = set()
for descendant in descendants: for descendant in descendants: