[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/lib/python/Transaction - Manager.py:1.1 Transaction.py:1.1 IDataManager.py:1.3 ITransaction.py:1.3 __init__.py:1.3 _defaultTransaction.py:1.5

Tim Peters tim@zope.com
Mon, 29 Jul 2002 00:43:29 -0400


[Gary Poster]
> So...we've got True and False in here....so I guess we're only supposed
> to run Zope3 on Python CVS now

No, but you should be using Python 2.2.1 (it's got bugfixes over 2.2 that
are important for Zope).

> (which I assume has a boolean type and constants now)?

Yes, Python CVS does.

> Or am I missing something obvious?

No, not obvious.  Python 2.2.1 doesn't have a Boolean type, but does have
the names True and False in the builtin namespace (bound to 1 and 0,
respectively).  For things like

>         prepare_ok = True
>         for r in txn._resources:
>             if prepare_ok and not r.prepare(txn):
>                 prepare_ok = False

that's probably clearer than, say

    prepare_ok = [42]
and
    prepare_ok = `[42]`[:0]

as ways of spelling true and false <wink>.