Message3932

Author pjenvey
Recipients fwierzbicki, pb, pjenvey
Date 2008-12-16.06:09:05
SpamBayes Score 0.013409736
Marked as misclassified No
Message-id <1229407745.94.0.831911463679.issue1205@psf.upfronthosting.co.za>
In-reply-to
Content
An AST bug. Here's the difference between py/jy ASTs:

--- py25	2008-12-15 22:00:48.000000000 -0800
+++ jy25	2008-12-15 22:01:01.000000000 -0800
@@ -89,39 +89,7 @@
          ('left', ('Name (2,125)', ('id', 'y1'), ('ctx', ('Load',)))),
          ('ops', ('Lt',)),
          ('comparators',
-          ('Name (2,130)', ('id', 'y2'), ('ctx', ('Load',))))),
-        ('Compare (2,136)',
-         ('left',
-          ('BinOp (2,136)',
-           ('left',
-            ('BinOp (2,136)',
-             ('left',
-              ('Name (2,136)', ('id', 'x1'), ('ctx', ('Load',)))),
-             ('op', ('Pow',)),
-             ('right', ('Num (2,140)', ('n', 3))))),
-           ('op', ('Add',)),
-           ('right',
-            ('BinOp (2,142)',
-             ('left',
-              ('Name (2,142)', ('id', 'x2'), ('ctx', ('Load',)))),
-             ('op', ('Pow',)),
-             ('right', ('Num (2,146)', ('n', 3))))))),
-         ('ops', ('Eq',)),
-         ('comparators',
-          ('BinOp (2,151)',
-           ('left',
-            ('BinOp (2,151)',
-             ('left',
-              ('Name (2,151)', ('id', 'y1'), ('ctx', ('Load',)))),
-             ('op', ('Pow',)),
-             ('right', ('Num (2,155)', ('n', 3))))),
-           ('op', ('Add',)),
-           ('right',
-            ('BinOp (2,157)',
-             ('left',
-              ('Name (2,157)', ('id', 'y2'), ('ctx', ('Load',)))),
-             ('op', ('Pow',)),
-             ('right', ('Num (2,161)', ('n', 3)))))))))))))),
+          ('Name (2,130)', ('id', 'y2'), ('ctx', ('Load',))))))))))),
   ('Print (3,0)',
    ('dest', None),
    ('values',

Which means we didn't recognize the last if statement. i.e. we're 
thinking it's this (CPython gives the result of len 6 with this):

l = [(x1**3+x2**3,(x1,x2),(y1,y2)) for x1 in range(4) for x2 in range(4) 
if x1 < x2 for y1 in range(g) for y2 in range(g) if y1 < y2]
History
Date User Action Args
2008-12-16 06:09:05pjenveysetmessageid: <1229407745.94.0.831911463679.issue1205@psf.upfronthosting.co.za>
2008-12-16 06:09:05pjenveysetrecipients: + pjenvey, fwierzbicki, pb
2008-12-16 06:09:05pjenveylinkissue1205 messages
2008-12-16 06:09:05pjenveycreate