If the order of node-entry into seen_nodes is never used (if particular, if 'node in seen_nodes' is its only usage), then seen_nodes could be a set and the 'in' operation would be O(1) instead of O(n).

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to