well that appears to have been munged up ...
that tell() belongs immediately after self.str. making it
self.str.tell()


class FrankenString:
  def __init__(self,string=None):
        self.str = StringIO(string)
        self.atEnd = False
        self.lastidx = 0
        self.seek = self.str.seek
        self.tell = self.str.tell
  def __iter__(self):
        while not self.atEnd:
                char =  self.str.read(1)
                idx = self.str.tell()
                if self.lastidx == idx:
                        self.atEnd = True
                self.lastidx = idx
                yield char

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to