Prev: ANN: python-ldap-2.3.11
Next: A more specific query ...
From: Gary Robinson on 26 Feb 2010 13:08 The Python 2.6.4 docs for collections at http://docs.python.org/library/collections.html say that __next__() is an abstract method for the Iterable ABC. But my understanding is that __next__() isn't supposed to be used until Python 3. Also, I'm using the Mapping ABC, which inherits from Iterable, and it doesn't seem to work if I define __next__(); I am not seeing problems if I define next() instead. What am I missing? -- Gary Robinson CTO Emergent Music, LLC personal email: garyrob(a)me.com work email: grobinson(a)flyfi.com Company: http://www.flyfi.com Blog: http://www.garyrobinson.net
From: Raymond Hettinger on 26 Feb 2010 15:10 On Feb 26, 10:08 am, Gary Robinson <gary...(a)me.com> wrote: > The Python 2.6.4 docs for collections athttp://docs.python.org/library/collections.htmlsay that __next__() is an abstract method for the Iterable ABC. But my understanding is that __next__() isn't supposed to be used until Python 3. Also, I'm using the Mapping ABC, which inherits from Iterable, and it doesn't seem to work if I define __next__(); I am not seeing problems if I define next() instead. > > What am I missing? It's a typo. The abstract method is next(). Raymond
|
Pages: 1 Prev: ANN: python-ldap-2.3.11 Next: A more specific query ... |