boolean true and false values.

Peter Schneider-Kamp petersc at stud.ntnu.no
Wed Jun 14 18:05:03 EDT 2000


"Thaddeus L. Olczyk" wrote:
> 
> at the moment I am using
> false=(1==0)
> true=(1==1)
> but would like something more elegant, or at least less sloppy.

well, of course:
false = 0
true = 1

(or
 false = None
 true = [[]])

Not that the first one is equivalent to your definition.
>>> 1==0
0
>>> 1==1
1

what-d-ya-mean-by-sloppy-ly y'rs Peter
--
Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter at schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de




More information about the Python-list mailing list