It is something of a design feature of pydoctor's data model that you can crawl from anywhere to anywhere. This is mostly very handy, but it means that there are veeeeeeery long chains of references around, and if pickle or cPickle happen to choose one of these when pickling the system you can easily get recursion limit exceeded errors. So, we need to give pickle a hand, which is what Documentable.__getstate__ and System.__setstate__ are all about. Documentable.__getstate__ essentially replaces references to other Documentable objects with references to their fullNames(). These can't easily be resolved in a hypothetical Documentable.__setstate__ because the referenced Documentables probably don't exist yet (all Documentables are in cycles involving other Documentables except in edge cases; consider 'd.parent.contents[d.name] is d' for starters). So I sort all this out in System.__setstate__ (this probably means that if you try to pickle a Documentable directly it won't unpickle correctly; don't care very much). Trying to debug/fix this whilst on/recovering from a long haul flight was probably not the best idea.