Once all who care agree on the patch, feel free to check it in without
my review.
On 11/22/06, Walter Dörwald <[EMAIL PROTECTED]> wrote:
> Jack Diederich wrote:
>
> > On Wed, Nov 22, 2006 at 09:36:09AM +0100, Georg Brandl wrote:
> >> Terry Reedy schrieb:
> >>> "Brett Cannon" <[EMAIL PROTECTED]> wr
Jack Diederich wrote:
> On Wed, Nov 22, 2006 at 09:36:09AM +0100, Georg Brandl wrote:
>> Terry Reedy schrieb:
>>> "Brett Cannon" <[EMAIL PROTECTED]> wrote in message
>>> news:[EMAIL PROTECTED]
>>>
>>> Why can't the fallback usage just pass the return value from __len__ to
>>> bool() (forget the
On Wed, Nov 22, 2006 at 09:36:09AM +0100, Georg Brandl wrote:
> Terry Reedy schrieb:
> > "Brett Cannon" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > Why can't the fallback usage just pass the return value from __len__ to
> > bool() (forget the C function name) and retu
Terry Reedy schrieb:
> "Brett Cannon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> Why can't the fallback usage just pass the return value from __len__ to
> bool() (forget the C function name) and return that result? It's just like
> doing::
>
> def bool(obj):
> t
Terry Reedy wrote:
> If an object without __bool__ returned itself as its length, this
> would be
> an infinite loop, at least in this Python version. Do we worry about
> something so crazy?
Doesn't len() have a requirement that __len__ return an integer? If so,
perhaps it would be better if th
"Brett Cannon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Why can't the fallback usage just pass the return value from __len__ to
bool() (forget the C function name) and return that result? It's just like
doing::
def bool(obj):
try:
return obj.__bool__()