Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Philip Jenvey
On Jun 11, 2010, at 6:57 PM, Brett Cannon wrote: > On Fri, Jun 11, 2010 at 18:30, Guido van Rossum wrote: >> On Fri, Jun 11, 2010 at 5:41 PM, Benjamin Peterson >> wrote: >>> 2010/6/11 Brett Cannon : This "magical" ignoring of self seems to extend to any PyCFunction. Is this dichotomy

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Guido van Rossum
On Sat, Jun 12, 2010 at 10:19 AM, Philip Jenvey wrote: > +1 on changing this, it's annoying for alternate implementations. They > oftentimes implement functions in pure Python whereas user code might be > expecting the PYCFunction behavior. > > Jython's had a couple cases of this incompatibility

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Michael Foord
On 12 Jun 2010, at 20:59, Guido van Rossum wrote: On Sat, Jun 12, 2010 at 10:19 AM, Philip Jenvey wrote: +1 on changing this, it's annoying for alternate implementations. They oftentimes implement functions in pure Python whereas user code might be expecting the PYCFunction behavior.

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Christian Heimes
> method or instancemethod perhaps? The necessary code is already in Python 3.0's code base. I've added in in r56469 as requested in my issue http://bugs.python.org/issue1587. It seems we had this very discussion over two and a half year ago. Index: Python/bltinmodule.c ==

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Guido van Rossum
Hey! No borrowing the time machine! :-) On Sat, Jun 12, 2010 at 4:03 PM, Christian Heimes wrote: >> method or instancemethod perhaps? > > The necessary code is already in Python 3.0's code base. I've added in > in r56469 as requested in my issue http://bugs.python.org/issue1587. It > seems we had

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Guido van Rossum
(Of course, I'd still like to see the warning, since it's now a portability issue.) On Sat, Jun 12, 2010 at 4:15 PM, Guido van Rossum wrote: > Hey! No borrowing the time machine! :-) > > On Sat, Jun 12, 2010 at 4:03 PM, Christian Heimes wrote: >>> method or instancemethod perhaps? >> >> The nece

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Christian Heimes
Am 13.06.2010 01:15, schrieb Guido van Rossum: > Hey! No borrowing the time machine! :-) Too late, Guido. The keys to the time machine are back at their usual place. You should hide them better next time. ;) Christian ___ Python-Dev mailing list Python-

Re: [Python-Dev] Are PyCFunctions supposed to invisibly consume self when used as a method?

2010-06-12 Thread Greg Ewing
Guido van Rossum wrote: bind the instance to the first argument when it is called on an instance. I can't think of a good name for that one right now, but we'll think of one. dynamicmethod? -- Greg ___ Python-Dev mailing list [email protected] ht