For reasons I dare not explain, this script should always execute

main() when imported (in other words, it is not usable as a module).
This commit is contained in:
Guido van Rossum 1999-04-02 22:18:25 +00:00
parent 8ff764f113
commit bd3bdde70b
1 changed files with 1 additions and 2 deletions

View File

@ -56,5 +56,4 @@ def show(total, d, prefix):
if d.has_key(key):
show(tsub, d[key][1], psub)
if __name__ == "__main__":
main()
main()