Forums

OT: Python Puzzler

Not related to PAW specifically, but I thought some people here might find this one an amusing little challenge. The following script is saved into a file called puzzle.py - how many times will it print its message when executed?

import puzzle
print "Puzzling?"
reload(puzzle)

Hint: if you run this with old versions of Python, the interpreter crashes... What change could they have made to fix this?