force variable declaration?

Jeff Davis jdavis at
Thu Oct 10 11:20:02 CEST 2002

what do you mean force variable declaration? you mean type checking?

You can't really force python to limit you like that. That type of checking 
is better served by a tool independent of the interpreter. For example, 
pychecker is great for spotting probable errors in your code, even when 
the interpreter doesn't complain. See if pychecker is able to help spot 
your error.

That way, we have the flexibility of python's dynamic typing, but we can 
spot our errors quickly as well.


> Hi,
> is it possible to force variable declaration in python (like it is for
> example in perl)? A few days ago I had an anoying error because of a
> typing error of a variable...
> Regards,
> Peter

More information about the Python-list mailing list