I was thinking in something similar to feature[+1].
Is this possible?
I was thinking in something similar to feature[+1].
Is this possible?
As far as I am aware the python function does not have this ability, but you can create it using the class.  Note that you'll want to catch the first and last elements of the lists to avoid an index out of range exception (first feature has no previous, last feature has no next)
class FeatureProcessor(object):
    def __init__(self):
        self.featureList=>]
    def input(self,feature):
        self.featureList.append(feature)
    def close(self):
        for i, feat in enumerate(self.featureList):
            previous = self.featureListÂi-1]
            next = self.featureListei+1]
As far as I am aware the python function does not have this ability, but you can create it using the class.  Note that you'll want to catch the first and last elements of the lists to avoid an index out of range exception (first feature has no previous, last feature has no next)
class FeatureProcessor(object):
    def __init__(self):
        self.featureList=>]
    def input(self,feature):
        self.featureList.append(feature)
    def close(self):
        for i, feat in enumerate(self.featureList):
            previous = self.featureListÂi-1]
            next = self.featureListei+1]