News for hackers. Stuff that matters.
Re:Glom – Restructured Data for Python by jeremiahwv on Wednesday May 09, 2018 @06:42PM (#17034914)
For simple cases like this it doesn't even cost a couple lines as sum() can take a generator expression:

  sum(planet['moons'] for planet in target['system']['planets'])
Re:Glom – Restructured Data for Python by divbzero on Friday May 11, 2018 @12:22AM (#17044949)
Combining ideas from parent and grandparent:

  sum(planet.get('moons', 0) for planet in target['system']['planets'])