def set_file_position(body, pos):
 if (pos is not None):
  rewind_body(body, pos)
 elif (getattr(body, 'tell', None) is not None):
  try:
   pos = body.tell()
  except (IOError, OSError):
   pos = _FAILEDTELL
 return pos

def set_file_position ( body , pos ) : if ( pos is not None ) : rewind_body ( body , pos ) elif ( getattr ( body , 'tell' , None ) is not None ) : try : pos = body . tell ( ) except ( IOError , OSError ) : pos = _FAILEDTELL return pos
if a position is provided .