[Python-Dev] LOAD_NAME & classes (original) (raw)

Guido van Rossum guido@python.org
Wed, 24 Apr 2002 08:57:14 -0400


> PyChecker goes a long way already. Java has a mass of "definite > assignment" rules instead, which in effect decree that you must > write code in such a way that the compiler can always guess right.

Are these explained in an easy to digest form somewhere?

Dunno, but I can easily guess the gist of it: a variable is only defined on paths if it would still always be defined if all conditional statements randomly chose between true or false, and all loops executed a random number of times which may include zero. I assume that this means dependencies between variables are out (these made the examples reported by Neil work).

--Guido van Rossum (home page: http://www.python.org/~guido/)