Implementing a directed graph in python
<p>I read <a href="http://www.python.org/doc/essays/graphs/" rel="nofollow">Python Patterns - Implementing Graphs</a>. However this implementation is inefficient for getting the edges that point to a node. </p>

<p>In other languages a common solution is using a two-dimensional array, but to do this in Python would require a list of lists. This does not seem pythonic. </p>

<p>What is an implementation of a directed graph in python where finding all the nodes with edges to and from a node (as two separate lists) is fast?</p>
