Author stuarteberg
Recipients benjamin.peterson, cvk, stuarteberg
Date 2017-01-19.15:08:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In addition to zip(), this problem also affects map() and filter().

The problem is that the match patterns in FixZip, FixMap, and FixFilter do not allow for more than one "trailer" node.  (And even if they did, their transform() methods aren't expecting it.)

For example, in the following expression, 'zip' is followed by two 'trailers', which are '(a,b)', and [0]:


... but FixZip.PATTERN only expects a single trailer (the argument list), so the presence of a second trailer prevents the match:

(Here's the relevant line of the grammar:

I've written a patch that fixes this problem for zip, map, and filter, with tests.  See attached.

BTW, this problem was previously reported in 21628, but that issue was incorrectly closed as a duplicate, so I'm submitting my patch here.
Date User Action Args
2017-01-19 15:08:08stuartebergsetrecipients: + stuarteberg, benjamin.peterson, cvk
2017-01-19 15:08:08stuartebergsetmessageid: <>
2017-01-19 15:08:08stuarteberglinkissue28837 messages
2017-01-19 15:08:08stuartebergcreate