Commit 93035798 authored by scott snyder's avatar scott snyder Committed by Charles Delort
Browse files

Fix for compatibility with py3 iterators.

py3 iterators need a __next__() method, while py2 used next().
parent 5a15f06f
......@@ -247,6 +247,8 @@ def coral_AttributeList():
self.attrList = attrList
def __iter__(self):
return self
def __next__ (self):
return self.next()
def next(self):
if self.iterator != self.attrList.end():
k = self.iterator.__deref__().specification().name()
......@@ -285,6 +287,8 @@ def coral_Blob():
#self.size = self.spec.size()
def __iter__(self):
return self
def __next__ (self):
return self.next()
def next(self):
if self.index < self.spec.size() :
k = self.spec[self.index]
......@@ -351,6 +355,8 @@ def cool_IRecordSpecification():
#self.size = self.spec.size()
def __iter__(self):
return self
def __next__ (self):
return self.next()
def next(self):
if self.index < self.spec.size() :
k = self.spec[self.index]
......@@ -430,6 +436,8 @@ def cool_IRecord():
self.record = record
def __iter__(self):
return self
def __next__ (self):
return self.next()
def next(self):
if self.index < len(self.record):
k = self.record.field(self.index).name()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment