[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-patches
Subject:    [Patches] [ python-Patches-752911 ] ast-branch: multiple function
From:       noreply () sourceforge ! net (SourceForge ! net)
Date:       2003-12-27 11:21:08
Message-ID: E1AaH7k-0006R5-00 () sc8-sf-web1 ! sourceforge ! net
[Download RAW message or body]

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: Closed
>Resolution: Fixed
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-27 11:17

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

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

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic