Nov-08-2022, 10:11 AM
Hi,
I came across a "bug" that was hard to find.
Found it, but found no good explanation of the why.
This code did "do_stuff_1", but ignored the "Print(result)" and the do_stuff_2.
No error was printed.
Of course, you will have noticed that "Print(result)" is with a capital "P" , that was the problem.
Question:
Does "Print" have some special meaning in python, or why did I not get any error message.
(Windows 11, Python 3.10.1, Idle editor.)
thx,
Paul
I came across a "bug" that was hard to find.
Found it, but found no good explanation of the why.
1 2 3 4 5 6 |
try : do_stuff_1 Print (result) do_stuff_2 except Exception as e: print (e) |
No error was printed.
Of course, you will have noticed that "Print(result)" is with a capital "P" , that was the problem.
Question:
Does "Print" have some special meaning in python, or why did I not get any error message.
(Windows 11, Python 3.10.1, Idle editor.)
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.