[issue6826] Add __contains__ to range type

2009-09-02 Thread Joseph Thomson
New submission from Joseph Thomson joseph.thom...@gmail.com: The range type should implement the __contains__ method. Currently an expression like 'x in range(1000)' will iterate through every item in the range (exiting when an item tests true for equality); this is highly unnecessary as

[issue6826] Add __contains__ to range type

2009-09-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Closing this as a duplicate of issue 1766304. Joseph, please could you renew the discussion in that issue instead? -- nosy: +marketdickinson resolution: - duplicate status: open - closed superseder: - improve xrange.__contains__