Archive:
Subtopics:
Comments disabled |
Sun, 06 Feb 2022
A one-character omission caused my Python program to hang (not)
I just ran into a weird and annoying program behavior. I was
writing a Python program, and when I ran it, it seemed to hang.
Worried that it was stuck in some sort of resource-intensive loop I
interrupted it, and then I got what looked like an error message from
the interpreter. I tried this several more times, with the same
result; I tried putting The real problem was that the first line which said:
when it should have been:
Without that magic
which tells it to run the I didn't even know there was an I might have picked up on this sooner if I had actually looked at the error messages:
In particular, I don't remember making this mistake before but it seems like it would be an easy mistake to make. It might serve as a good example when explaining to nontechnical people how finicky and exacting programming can be. I think it wouldn't be hard to understand what happened. This computer stuff is amazingly complicated. I don't know how anyone gets anything done. [Other articles in category /Unix] permanent link |