True/False

Martin v. Löwis martin at v.loewis.de
Wed Apr 23 15:16:16 EDT 2003


Ian Bicking <ianb at colorstudy.com> writes:

> Note that the idiom I've been using (and which I've seen elsewhere) is:
> 
> True, False = 1==1, 0==1
> 
> Which retains proper boolean objects.

For Python 2.x, this does not really matter much. Yes, you do get
references to Py_True/Py_False, but they are still just integer
objects with the value 1/0.

Regards,
Martin





More information about the Python-list mailing list