For those using Bazel this looks like a pretty helpful example
of developing and releasing a cross-platform Python package with native-libs (C++ in this case).<p>I've wondered for a while how Deepmind manages their (Python & C++) codebase. This is a small window into that I think, and you can see that they're likely using internal 'Blaze' Python rules and rely on the maintenance of compatibility with the open-source Bazel rules. `py_library` is used in `tree/BUILD`, but it is not loaded explicitly as is expected with Bazel these days; the rule definition is loaded by Bazel implicitly.
From the tree docs:<p>> tree has originally been part of TensorFlow and is available as tf.nest.<p>The tf.nest docs can be found here and may be more useful for now: <a href="https://www.tensorflow.org/api_docs/python/tf/nest" rel="nofollow">https://www.tensorflow.org/api_docs/python/tf/nest</a><p>I'm glad this is being moved out of TensorFlow. It's a really useful library on its own and I've found myself reaching for it on projects without wanting to import all of TensorFlow.
Caveat emptor: "The behavior for structures with cycle references is undefined"<p>Isn't this a pretty common error to occur in Python programs? It would be good to at least have a checked mode available, otherwise the "dragons may fly out of your nose" semantics feels like a pretty aggressive compromise in favour of performance vs correctness.