[Python-3000] __bool__ in 2.6?
Guido van Rossum
guido at python.org
Mon Oct 29 19:51:23 CET 2007
2007/10/29, Fred Drake <fdrake at acm.org>:
> On Oct 29, 2007, at 2:40 PM, James Thiele wrote:
> > So just to clarify:
> > 2.6 __nonzero__ first, then __bool__ (if patch submitted)
> > 3.x __bool__ first, then __nonzero__
>
> I'd expect switching the order for this to be a bug magnet. I'd much
> rather see:
>
> 2.5 __nonzero__ only
> 2.6 __bool__ first, then __nonzero__ (if patch submitted)
> 3.x __bool__ first, then __nonzero__
>
> The fewer variations there are in the algorithm, the better.
Makes sense, if you change the 3.x rule to
3.x __bool__ only.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list