News for hackers. Stuff that matters.
Re:Programming languages should have a tree traversal primitive by Retr0id on Tuesday April 29, 2025 @10:29AM (#43833178)
I avoided the stack limit by using itertools.chain: https://github.com/DavidBuchanan314/millipds/blob/15727d474c...

(this is for iterating over nested JSON-like objects, which are just weird trees)

Re:Programming languages should have a tree traversal primitive by packetlost on Tuesday April 29, 2025 @11:46AM (#43834234)
CBOR objects, to be specific ;)

There are a lot of ways you could avoid the recursion, but that's a particularly nice way!