1172
On this deserted island I could use some help()
(lemmy.blahaj.zone)
Post funny things about programming here! (Or just rant about your favourite programming language.)
This is the code (Github link):
What happens is that the python repl calls
__repr__automatically on each variable/statement that you type into the repl (except assignments e.g.x = 1). But this basically only happens in the repl. So "executing" onlyexitwouldn't work in a python script as it is not calling__repr__automatically, so better you learn how to do it right than using justexitin your python scripts and scratching your head why it works in the repl but not in your code.