title: Making a python iterator go backwards?
body: <p>Is there anyway to make a python list iterator to go backwards?</p>
  
  <p>Basically i have this</p>
  
  <pre><code>class IterTest(object):
      def __init__(self, data):
          self.data = data
          self.__iter = None
  
      def all(self):
          self.__iter = iter(self.data)
          for each in self.__iter:
              mtd = getattr(self, type(each).__name__)
              mtd(each)
  
      def str(self, item):
          print item
  
          next = self.__iter.next()
          while isinstance(next, int):
              print next
              next = self.__iter.next()
  
      def int(self, item):
          print "Crap i skipped C"
  
  if __name__ == '__main__':
      test = IterTest(['a', 1, 2,3,'c', 17])
      test.all()
  </code></pre>
  
  <p>Running this code results in the output:</p>
  
  <pre><code>a
  1
  2
  3
  Crap i skipped C
  </code></pre>
  
  <p>I know why it gives me the output, however is there a way i can step backwards in the str() method, by one step?</p>
  
  <p><em>EDIT</em></p>
  
  <p>Okay maybe to make this more clear. I don't want to do a full reverse, basically what i want to know if there is an easy way to do the equivalent of a <strong>bidirectional</strong> iterator in python?</p>