def fixParam(line):
 result = re.sub('(\\w+):', '@param \\1', line)
 result = re.sub('   @', '@', result)
 return result

def fixParam ( line ) : result = re . sub ( '(\\w+):' , '@param \\1' , line ) result = re . sub ( '   @' , '@' , result ) return result
change foo: bar to @foo bar .