[Python-Dev] What's a PyStructSequence ?

Skip Montanaro skip@pobox.com (Skip Montanaro)
Tue, 27 Nov 2001 14:57:03 -0600


    Michel> I have no idea why they are not exposed, of course. but my guess
    Michel> would be because there is no boolean type, there is no need for
    Michel> them.  I myself have never needed a boolean type, "zero" or
    Michel> "empty" have always worked for me as a boolean false.

XML-RPC defines a Boolean data type, so xmlrpclib defines a Boolean class
with True and False instances.  Programmers wanting to send boolean values
must pass one of them (and expect to receive them when data arrives).  Given
that Py_True and Py_False are sitting there just below the surface, it seems
a (small) shame that /F had to do that, more so now that xmlrpclib is part
of the core distribution.

Interestingly (or oddly, not sure which) enough, Lib/test/test_iter.py also
defines a small Boolean class.

-- 
Skip Montanaro (skip@pobox.com - http://www.mojam.com/)