This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ast-branch: multiple function fixes
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jhylton Nosy List: jhylton, logistix, nnorwitz
Priority: normal Keywords: patch

Created on 2003-06-11 21:08 by logistix, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
astfixes.diff logistix, 2003-06-11 21:08 patch for various function fixes
astfixes2.diff nnorwitz, 2003-12-26 21:47 updated patch
Messages (3)
msg43943 - (view) Author: Grant Olson (logistix) Date: 2003-06-11 21:08
This patch fixes:

- handling of keywords, varargs, and kwargs on function 
definition
- handing of keywords, varargs, and kwargs on function 
call
- handling of keywords for lambdas
- function chaining (foo().bar().baz())

Applying this uncovers some another bug that at least:

- cause a core dump upon import of  sre_parse
- cause an infinate loop upon import of ntpath

I believe I've tracked down the problem to the 
generation of bad bytecode for nested loops, as in:

for x in 1,2:
    for y in 3,4:
        print x,y

This causes problems with Subpattern.dump() in 
sre_parse and ntpath's commonprefix().

I'll try to figure out what's wrong with nested loops next.
msg43944 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-12-26 21:47
Logged In: YES 
user_id=33168

Almost all of this has been checked in by Jeremy.  I'm not
sure if he took it from the patch or not.  There are only
two small changes that look like they haven't been applied.
 Attached is an updated patch.

The updated patch fixes a problem when MAKE_FUNCTION on a
lambda.  It always used the len of args, rather than the
length of defaults.  The other fix is for calling a func
with **kwargs.  The # args never included the kwarg count.
msg43945 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-12-27 16:17
Logged In: YES 
user_id=33168

for/while loops are fixed, afaik.  The rest of this patch
was implemented.  So calling functions with keywords and
chaining comparison operators should work.

Python/newcompile.c 1.1.2.58
History
Date User Action Args
2022-04-10 16:09:09adminsetgithub: 38630
2003-06-11 21:08:28logistixcreate