File: __init__.py

package info (click to toggle)
sqlalchemy 0.6.3-3%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,744 kB
  • ctags: 15,132
  • sloc: python: 93,431; ansic: 787; makefile: 137; xml: 17
file content (9 lines) | stat: -rw-r--r-- 360 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
"""
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()

"""