Greg Ewing wrote:
> Guido van Rossum wrote:
>> They have that too. See:
>>
> f = list.append
> g = f.__get__(a)
> g
>>
>
> Hmmm. It seems that C method objects are more
> like an unbound method object that's pre-bound to a
> particular class.
>
> I'm concerned with built-in function
Guido van Rossum wrote:
> They have, if you only consider the *important* operations. For method
> descriptors the only thing you can count on is __call__. The rest are
> internal implementation details -- and besides, what would you expect
> im_func to be for a C function? :-)
I'd just never thou
On Nov 26, 2007 10:43 PM, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > They have that too. See:
> >
> f = list.append
> g = f.__get__(a)
> g
> >
> >
>
> Hmmm. It seems that C method objects are more
> like an unbound method object that's pre-bound to a
> particul
On Nov 27, 2007 2:16 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Greg Ewing wrote:
> > Guido van Rossum wrote:
> >> They have that too. See:
> >>
> > f = list.append
> > g = f.__get__(a)
> > g
> >>
> >
> > Hmmm. It seems that C method objects are more
> > like an unbound method objec
On Nov 27, 2007 10:29 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> The attached implementation is simple enough...
Do note that this breaks quite a bit of code that was storing built-in
functions as class variables and accessing them via self.xxx...
--
--Guido van Rossum (home page: http://
Guido van Rossum wrote:
> Like 'len', right?
Yes, anything that's a stand-alone function rather than
a method of some C type.
> Couldn't PyRex define its own type for its functions that has a
> __get__ descriptor with the appropriate semantics?
Yes, it could, but it would be more run-time suppor
On Nov 27, 2007 4:35 PM, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > Like 'len', right?
>
> Yes, anything that's a stand-alone function rather than
> a method of some C type.
>
> > Couldn't PyRex define its own type for its functions that has a
> > __get__ descriptor with th
Guido van Rossum wrote:
> Funny, that. I tried my patch (see previous message) and 50 unittests
> had at least one failure.
That's quite surprising!
> I know you're not going to like this, but I'm asking that you
> provide a patch yourself.
Fair enough. I'll file this idea away for when I get
ar