sometimes a python interpreter I am using will give me a random error, that I know is wrong, but no matter how many times I retry it, it just won't run the script
why are python interpreters so stupid?
Started by
Guest_x42_*
, Jun 05 2010 04:09 PM
12 replies to this topic
#1
Guest_x42_*
Posted 05 June 2010 - 04:09 PM
Guest_x42_*
|
|
|
#2
Posted 06 June 2010 - 03:40 AM
General rule of thumb: assume the error is the programmer's, not the interpreter's/compiler's. I can't tell you how many times I've written "correct code" that "should work" and, after some research, discovered that I had found a well-known boundary condition where I was wrong. It happens to me regularly with SQL statements (especially against Oracle), C++, C, Delphi, ASP (which is buggy as all get out), ColdFusion, and just about every language I use.
#3
Guest_x42_*
Posted 06 June 2010 - 07:32 AM
Guest_x42_*
you don't get it, I have gone through the program the way a python interpreter would, character by character, several times, and I can't find what is wrong in syntax with:
"entities={}"
"entities={}"
#4
Posted 06 June 2010 - 10:52 AM
Well, a little searching gave me this: 5. Built-in Types — Python v2.6.5 documentation Perhaps it's an illegal statement. And no, I'm not a python programmer.
#5
Posted 06 June 2010 - 12:12 PM
(hmm did you post the code before? )
Anyway if i remember correctly, when i looked at it before the previous line missed a ")". So check if thats the problem.
Anyway if i remember correctly, when i looked at it before the previous line missed a ")". So check if thats the problem.
#6
Posted 15 June 2010 - 02:32 PM
Haha, launch the interpreter, only type in this single line*, and then ask yourself whether you are the source of the problem or Python is.
*which will work, so saeras is probably right.
*which will work, so saeras is probably right.
#7
Guest_x42_*
Posted 19 June 2010 - 03:31 PM
Guest_x42_*
right, I found out what the problem is, but that doesn't mean it was completely my fault, it's like I always say: "you can't blame me just because it is my fault!" (no just kidding, I made that up), but really couldn't it have told me the error was with the line above it?, would it really be so hard to make an interpreter that can tell when you haven't added enough )s?
#8
Posted 19 June 2010 - 11:00 PM
Interpreters aren't designed to exhaust ostensive algorithms to warn the user of such a simple syntactical mistake. A bracket being opened can entail anything, how is the interpreter supposed to realize you didn't mean to continue the prior bracket to a new line?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#9
Posted 20 June 2010 - 02:50 PM
x42 said:
would it really be so hard to make an interpreter that can tell when you haven't added enough )s?
Python-list Info Page
#10
Guest_x42_*
Posted 20 June 2010 - 05:53 PM
Guest_x42_*
so you are saying that I can't actually trust it to tell me what line the error is really on?, well than why even try?, if you can't do it, then don't claim you can
#11
Guest_x42_*
Posted 20 June 2010 - 05:53 PM
Guest_x42_*
true, but it would be nice to tell me what line my error is on
#12
Posted 20 June 2010 - 08:11 PM
What don't you understand?
I don't know how long you've been programming, but by the looks of your other posts, not very long.
Dude, you can't expect the interpreters/compilers to be perfect, to tell you exactly what you are doing wrong, to give you precise advice about what should be done, to analyse the market and tell you what stocks to buy!
Most of the errors you've been posting about are common errors that new people do since they don't really understand everything they use. Eventually you'll understand those common errors and notice them very fast, without the use of a compiler or a debugger.
We don't mind explaining what's wrong, but we do mind angry people.
I mean, come on, you're trying to learn to program and you say things are stupid just because they're not the way you expect them to be.
Grow up.
I don't know how long you've been programming, but by the looks of your other posts, not very long.
Dude, you can't expect the interpreters/compilers to be perfect, to tell you exactly what you are doing wrong, to give you precise advice about what should be done, to analyse the market and tell you what stocks to buy!
Most of the errors you've been posting about are common errors that new people do since they don't really understand everything they use. Eventually you'll understand those common errors and notice them very fast, without the use of a compiler or a debugger.
We don't mind explaining what's wrong, but we do mind angry people.
I mean, come on, you're trying to learn to program and you say things are stupid just because they're not the way you expect them to be.
Grow up.


Sign In
Create Account

Back to top










