[Python-3000] PEP 3102 question

Thomas Wouters thomas at python.org
Thu Apr 3 01:17:20 CEST 2008


On Wed, Apr 2, 2008 at 10:30 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

> On Wed, Apr 2, 2008 at 3:47 PM, Guido van Rossum <guido at python.org> wrote:
>
> >  >  >  Thomas Wouters's changes for variable tuple packing might fix
> this, if
> >  >  >  we can agree to add that feature.
> ..
> >
> >  Thomas isn't finished yet.
>
> The reason I am asking is that I've been looking into ways of fixing
> the way instance methods are reporting  the number of arguments
> <http://bugs.python.org/issue2516> and it looks like some things may
> need to be rearranged in ceval in order to provide a fix and I don't
> want to propose a patch that will conflict with someone else's work.


My work actually won't be changing any of the function-calling opcodes. The
current trick bound methods use (replacing the function value on the stack
with the 'self' argument and increasing the number of arguments by one) is
unaffected. I may change them very subtly: currently the _VAR* opcodes
expect positional arguments, then keyword arguments, then the *args argument
on the stack. It looks like we're going to have to change that order, but I
don't see how that would affect the number-of-arguments reporting. And if it
does, too bad for me; I'm pretty sure your change will go in before mine,
and I've got lots of experience merging things :-)

-- 
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20080403/da491307/attachment.htm 


More information about the Python-3000 mailing list