Re: [Python-3000] callable()

2006-07-19 Thread Talin
Greg Ewing wrote: > Guido van Rossum wrote: > > >>But I'm not proposing to use hasattr(obj, '__call__'). I'm basically >>saying that the callable test has very little to do with whether the >>later call will succeed, because we have no way to test the signature. > > > I don't think that's neede

Re: [Python-3000] callable()

2006-07-19 Thread Stefan Behnel
Greg Ewing wrote: > Guido van Rossum wrote: > >> But I'm not proposing to use hasattr(obj, '__call__'). I'm basically >> saying that the callable test has very little to do with whether the >> later call will succeed, because we have no way to test the signature. > > I don't think that's needed

Re: [Python-3000] callable()

2006-07-19 Thread Guido van Rossum
On 7/18/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > Andrew Koenig wrote: > > > I am uncomfortable about exposing the implementation this way, if only > > because it would require fixing the equivalence between callable() and > > hasattr(obj, '__call__') for all time. > > I don't see anything bad ab

Re: [Python-3000] callable()

2006-07-19 Thread Ronald Oussoren
On Jul 19, 2006, at 6:31 PM, Guido van Rossum wrote: > On 7/18/06, Greg Ewing <[EMAIL PROTECTED]> wrote: >> Andrew Koenig wrote: >> >>> I am uncomfortable about exposing the implementation this way, if >>> only >>> because it would require fixing the equivalence between callable >>> () and >>>

Re: [Python-3000] callable()

2006-07-19 Thread Greg Ewing
Ronald Oussoren wrote: > Classic classes? I just checked, and it seems they've been fixed too: callable() and hasattr(obj, '__call_') give the same result -- true if and only if a __call__ method has been defined. Anyway, the point I was making is that this equivalence is a *good* thing -- I can

Re: [Python-3000] callable()

2006-07-19 Thread Ronald Oussoren
On Jul 20, 2006, at 3:26 AM, Greg Ewing wrote: > Ronald Oussoren wrote: > >> Classic classes? > > I just checked, and it seems they've been fixed too: > callable() and hasattr(obj, '__call_') give the same > result -- true if and only if a __call__ method has > been defined. But classic classes