need help regarding compilation

Kent Johnson kent at kentsjohnson.com
Thu Feb 23 13:16:40 EST 2006


fidlee wrote:
>>Try this:
>>
>>def fac(x):
>> if x<=1:return 1
>> return x*fac(x-1)
> 
> 
> I am still getting an error in compilation. Would be really thankful if
> someone could tell me as to what is going wrong.

Try running the compiler under Java 1.4, or just run the class in the 
jython interpreter without compiling it first. For simple examples like 
this you don't need to compile, just run it with
   jython factor.py

Kent



More information about the Python-list mailing list