[New-bugs-announce] [issue4920] Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.

Jaroslaw Rosiek report at bugs.python.org
Mon Jan 12 12:10:08 CET 2009


New submission from Jaroslaw Rosiek <jaroslaw.rosiek at interia.pl>:

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 :))?

----------
components: Library (Lib)
files: example1.py
messages: 79662
nosy: jrosiek
severity: normal
status: open
title: Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file12698/example1.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4920>
_______________________________________


More information about the New-bugs-announce mailing list