Newbie : checking semantics

LDD loicderoyand at yahoo.fr
Sat May 7 18:05:20 EDT 2005


Hi everyone,

I am new to python and was very enthustic about its possibilities when
I discover that python is really what it is : just a scripting
language.

What disappoints me is that pyton will happily accept and execute this
code :

if ( aConditionThatIsFalse ):
     AFunctionThatIsntDefined()

print "Hello world"

The fact that python doesn't check if the symbol
AFunctionThatIsntDefined is defined, is really bad when you develop big
pieces of code. You will never be sure that your code is free of this
kind of dummy errors and testing every possible execution paths is
nightmarish !

Is there a way to force Python to check the definition of symbol ?

LDD




More information about the Python-list mailing list