[Patches] [ python-Patches-1095541 ] fix for trivial flatten bug in astgen
SourceForge.net
noreply at sourceforge.net
Thu Jun 2 07:55:46 CEST 2005
Patches item #1095541, was opened at 2005-01-04 08:15
Message generated for change (Comment added) made by nascheme
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1095541&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.4
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: DSM (dsm001)
>Assigned to: Neil Schemenauer (nascheme)
Summary: fix for trivial flatten bug in astgen
Initial Comment:
The flatten in compiler.ast (from astgen) doesn't work
for sublists, although the source shows it tries to:
>>> compiler.ast.flatten([1,2,(3,4)])
[1, 2, 3, 4]
>>> compiler.ast.flatten([1,2,[3,4]])
[1, 2, [3, 4]]
The dangers of calling your lists 'list'.. (type is
list check fails.) A brief glance suggests it gets
called with tuples instead so I don't think the bug has
any obvious consequences.
----------------------------------------------------------------------
>Comment By: Neil Schemenauer (nascheme)
Date: 2005-06-02 05:55
Message:
Logged In: YES
user_id=35752
Checked in along with a little test.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2005-04-13 20:06
Message:
Logged In: YES
user_id=357491
Accidentally assigned this as an AST patch when it actuality
it is for the compiler package.
Fixed to be the proper group and assigned to Jeremy.
----------------------------------------------------------------------
Comment By: Björn Lindqvist (sonderblade)
Date: 2005-02-12 03:00
Message:
Logged In: YES
user_id=51702
The patch works but it would be nice if there was a test in
test_compiler.py that checks for correctness of the flattens
too.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1095541&group_id=5470
More information about the Patches
mailing list