jython: True and False boolean literals?

Kent Johnson kent at kentsjohnson.com
Thu Dec 22 14:22:37 EST 2005


davidmichaelkarr at gmail.com wrote:
> Aren't there boolean literals for "True" and "False" in Python
> (jython)?  I can't get "true", "True", "false", or "False" to work.  I
> ended up having to use "(1==1)" and "(1==0)".

No, there are not. Jython implements Python 2.1 which did not have boolean literals. You 
can just use 1 and 0.

Kent



More information about the Python-list mailing list