"BBands" wrote: > In the invaluable 'Dr. Dobb's Python-URL! - weekly Python news and > links' of April 17 Peter Otten writes: "Michele Simionato's little > script lets you search for a name in Python scripts, avoiding false > positives that a standard tool like grep would yield." Can someone > explain why this is so?
consider grepping for "main" in this script: def main(): # this is the main function print "hello, main" if __name__ == "__main__": main() a standard grep will find five instances. a word grep will find four. a name token grep will find two. </F> -- http://mail.python.org/mailman/listinfo/python-list