[Python-3000] __bool__ in 2.6?

Guido van Rossum guido at python.org
Mon Oct 29 19:50:50 CET 2007


2007/10/29, James Thiele <python3now at gmail.com>:
> So just to clarify:
> 2.5 __nonzero__ only
> 2.6 __nonzero__ first, then __bool__ (if patch submitted)
> 3.x __bool__ first, then __nonzero__
>
> Is this correct?

No. 3.x tests __bool__ only.

> On 10/29/07, Guido van Rossum <guido at python.org> wrote:
> > 2007/10/28, Brett Cannon <brett at python.org>:
> > > On 10/28/07, James Thiele <python3now at gmail.com> wrote:
> > > > PEP 361 lists __bool__ support as being possible for 2.6 backporting.
> > > > As of today the trunk build uses __nonzero__ like 2.5 but 3.0 alpha
> > > > uses __bool__. Has a decision been made on whether this will make the
> > > > cut for 2.6?
> > > >
> > > > In a more general vein, is there a cutoff date for producing a list of
> > > > 3.0 features which will be backported to 2.6?
> > >
> > > Backporting decisions have not been made as the feature set of 3.0 is
> > > still a moving target.  Once we nail down the features (I am going to
> > > guess not until b1 at the earliest) then backporting will probably
> > > start.
> >
> > In this case, like many, the backport can't be an exact copy of the
> > 3.0 code: 2.6 *must* support __nonzero__. But it should also support
> > __bool__ as a fallback. I think it would be great if someone submited
> > a patch to implement this (though it isn't necessarily the highest
> > backporting priority).
> >
> > --
> > --Guido van Rossum (home page: http://www.python.org/~guido/)
> >
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list