Re: [Python-3000] callable()

2006-07-22 Thread Greg Ewing
Andrew Koenig wrote: > To my way of thinking, callable, iterable, and hashable are the same kind of > concept, But you've just pointed out that they're *not* the same kind of concept, no matter how much you might wish that there were. The only way to make hashability testable at less cost than a

Re: [Python-3000] callable()

2006-07-22 Thread Guido van Rossum
On 7/22/06, Andrew Koenig <[EMAIL PROTECTED]> wrote: > This example illustrates an important point: Some object properties don't > correspond directly to the presence of a particular attribute, and can't > easily be made to do so. > > In other words: > > Is it callable? No problem, just c

Re: [Python-3000] callable()

2006-07-22 Thread Andrew Koenig
> > That would be at odds with the approach taken with > > list.__hash__ which has to be called in order to find-out it is not > > hashable. > That feature of __hash__ is just an unfortunate necessity. > It arises because hashability is sometimes a "deep" > property (i.e. it depends on the hashabi

Re: [Python-3000] callable()

2006-07-22 Thread Greg Ewing
Raymond Hettinger wrote: > That would be at odds with the approach taken with > list.__hash__ which has to be called in order to find-out it is not > hashable. That feature of __hash__ is just an unfortunate necessity. It arises because hashability is sometimes a "deep" property (i.e. it depends