code: def readline(self):
          
          line = self.fd.__class__.readline(self.fd)
          if isinstance(line, bytes):
              line = line.decode()
          return line
docs: Readline wrapper to force readline() to return str objects.