Files
sqlalchemy/examples/graphs/__init__.py
T
Mike Bayer 546015e6e1 - add a new sphinx extension "viewsource". takes advantage of part of the viewcode extension
to allow ad-hoc display of the source of any file, as well as a "directory listing" structure.
- reorganize examples/ to take advantage of new extension.  in particular, keep moving all
the descriptive text for files etc. into module docstrings, taking more advantage of
self-documentation.
2013-11-09 19:42:01 -05:00

13 lines
376 B
Python

"""An example of persistence for a directed graph structure. The
graph is stored as a collection of edges, each referencing both a
"lower" and an "upper" node in a table of nodes. Basic persistence
and querying for lower- and upper- neighbors are illustrated::
n2 = Node(2)
n5 = Node(5)
n2.add_neighbor(n5)
print n2.higher_neighbors()
.. autosource::
"""