Standard graph API?

Robert Brewer fumanchu at
Mon Aug 23 19:34:41 CEST 2004

> Is there any interest in a (hypothetical) standard graph API (with
> 'graph' meaning a network, consisting of nodes and edges)?

1) Yes!
2) Only if it's in C. I don't mind (re)writing pure Python graph
containers, it's the speed of a pure Python graph that's the bigger
issue to me (mostly object inspection and/or
decorate-insert-retrieve-undecorate cycles). If it started in a
pure-Python package, then went into the stdlib, and then got a C
implementation (like did), that would be fine.
3) It would have to accept arbitrary objects. No "make your class a
subclass of GraphNode" garbage. If someone wanted to make a subclass of
Graph called StringGraph, which was optimized for strings, or IntGraph
optimized for ints, that would be fine. But the base class (I assume a
class implementation?) should handle instances of Object.

I'm sure there are many more details, but those are the big ones IMO.

Robert Brewer
Amor Ministries
fumanchu at

More information about the Python-list mailing list