python - Interpreter more strict -


Today, I have lost a lot of time to fix a stupid error in my code. Very simplified, the problem was: def f (): return 2 2 == f

I forgot to write parentheses in sentences, so I Comparison of an indicator function with numbers

OK, my question:

Is there any way to translate the interpreter more with the code? For example, show more warnings ...

thanks ^^

of these The disadvantage of working with a dynamically typed language is that there is little information in the language environment or there is no information about some kind of thing when it sees a statement, so when any statement is executed , Then it can not issue any warning.

For various reasons it is very convenient to be able to compare with all other people for all types of similarity. It makes tying a contrasting container much easier, so comparing a function to an integer is a defined thing, and since it can be in such a very useful case, the interpreter can not really warn you about it at runtime. And when the construction is doubtful, it looks at this statement when you do not warn it (to oppose it) because then there is no necessary type of information to issue the warning.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -