[Patches] [ python-Patches-752911 ] ast-branch: multiple function fixes

SourceForge.net noreply at sourceforge.net
Fri Dec 26 16:47:28 EST 2003


Patches item #752911, was opened at 2003-06-11 17:08
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=752911&group_id=5470

Category: Parser/Compiler
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: logistix (logistix)
Assigned to: Jeremy Hylton (jhylton)
Summary: ast-branch: multiple function fixes

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-12-26 16:47

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=752911&group_id=5470



More information about the Patches mailing list