Comment

Comment by amelius

Roughly speaking, by cycles I mean a structure that refers to itself somehow. For example:

    A = {}
    B = {}
    A["ref"] = B
    B["ref"] = A
So would it be possible to serialize A and B, and of course to deserialize them?

Note that

    print A
gives

    {'ref': {'ref': {...}}}
which is of course not a suitable serialization, since you can't recover the original structure from it.
parent amelius 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton