This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eddygeek
Recipients eddygeek
Date 2014-08-28.11:43:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409226181.07.0.476582309368.issue22294@psf.upfronthosting.co.za>
In-reply-to
Content
This is a patch for issues similar to #16573
With this patch, the following new tests are now unchanged:

r = dict(zip(s, range(len(s))), **d)
r = len(filter(attrgetter('t'), self.a))
r = min(map(methodcaller('f'), self.a))
max(map(node.id, self.nodes)) + 1 if self.nodes else 0
reduce(set.union, map(f, self.a))

Note that as part of the patch, the range transformation now calls the generic in_special_context in addition to the customized one (which. I guess, should be removed, but I didn't dare).

All existing tests pass, but the patterns used may not be strict enough, though I tried to stick to how it was done for other consuming calls.

M Lib/lib2to3/fixer_util.py
M Lib/lib2to3/fixes/fix_xrange.py
M Lib/lib2to3/tests/test_fixers.py
History
Date User Action Args
2014-08-28 11:43:01eddygeeksetrecipients: + eddygeek
2014-08-28 11:43:01eddygeeksetmessageid: <1409226181.07.0.476582309368.issue22294@psf.upfronthosting.co.za>
2014-08-28 11:43:00eddygeeklinkissue22294 messages
2014-08-28 11:43:00eddygeekcreate