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.

classification
Title: Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: jrosiek, rhettinger
Priority: high Keywords: patch

Created on 2009-01-12 11:10 by jrosiek, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
example1.py jrosiek, 2009-01-12 11:10 Example code for problem 1
example2.py jrosiek, 2009-01-12 11:11 Example code for problem 2
_abcoll.patch jrosiek, 2009-01-12 11:13 Suggested patch
Messages (3)
msg79662 - (view) Author: Jaroslaw Rosiek (jrosiek) Date: 2009-01-12 11:10
1. collections.MutableSet refers to __next__() slot instead of next()
buildin. 

2. collection.Iterator is not compatible with 2.6's iterators which
should have next() slot. Proposed solution: add a next() method to
collections.Iterator that falls back to __next__().

Attaching:
  1. Example code for problem 1
  2. Example code for problem 2
  3. A patch

When are you planning next bugfix release for 2.6 (I am particularly
interested in these issues :))?
msg79666 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2009-01-12 11:31
Good catch!
msg80730 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2009-01-28 23:15
Fixed in r69070 and r69071.

Thanks for the bug report and patch!
History
Date User Action Args
2022-04-11 14:56:44adminsetgithub: 49170
2009-01-29 00:11:02rhettingersetstatus: open -> closed
resolution: fixed
2009-01-28 23:15:56rhettingersetmessages: + msg80730
versions: + Python 2.7
2009-01-27 05:19:25rhettingersetassignee: rhettinger
2009-01-12 11:31:13rhettingersetpriority: high
nosy: + rhettinger
messages: + msg79666
2009-01-12 11:13:18jrosieksetfiles: + _abcoll.patch
keywords: + patch
2009-01-12 11:11:03jrosieksetfiles: + example2.py
2009-01-12 11:10:47jrosieksetfiles: - example2.py
2009-01-12 11:10:38jrosieksetfiles: + example2.py
2009-01-12 11:10:08jrosiekcreate