Puzzling: local variable in recursive function made global?

Terry Reedy tjreedy at udel.edu
Thu Mar 26 16:55:58 EDT 2009


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).




More information about the Python-list mailing list