Warn when filter, map, range, and filter are not used in iterating contexts

#216 Merged at e03699e
Repository
brettcannon
Branch
default
Repository
logilab
Branch
default
Author
  1. Brett Cannon
Reviewers
Description

Using semantics defined by lib2to3.fixer_util.in_special_context(), when the various built-ins that return an iterator in Python 3 are used in a way that does not guarantee that they will be used as purely an iterator, a warning is raised under --py3k.

Comments (4)

  1. Brett Cannon author

    I just wanted to quickly say I am not ignoring your comments, Claudiu. I have just been sick for the past week and so have not felt up to tackling everything quite yet.

  2. Claudiu Popa

    Looks much better, Brett. Thank you! Could you also add a ChangeLog entry and deal with the __() thingy? Everything else seems okay.