[XML-SIG] Re: [XML-checkins]CVS: xml/xml/dom expatbuilder.py,1.5,1.6
Fred L. Drake, Jr.
fdrake@acm.org
Mon, 23 Sep 2002 15:03:25 -0400
[Regarding the return of -1/0/1 as the value of the standalone field
for the XmlDeclHandler from pyexpat...]
Martin v. Loewis writes:
> I personally find this change quite ugly. Wouldn't it be much better
> if pyexpat would use True and False in the standalone flag?
I agree; I'd love it to be None/False/True, but that's an API change,
and enough people use the pyexpat interface directly that that's a bad
idea at this point. If a new interface to Expat ever emerges, it
should definately use a more "Pythonic" value.
> Also, what is the purpose of initializing _standalone to -1?
-1 indicates that it was never initialized, so we can store None for
no-value, rather than False. The truth-behavior works well, and it
can be tested for if needed.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation