append_f function
(Shortest import: from brian2cuda.utils import append_f)
- brian2cuda.utils.stringtools.append_f(match)[source]
Append
'f'to the string inmatchif it doesn’t end with'f'. Used inreplace_floating_point_literals.- Parameters:
match : re.MatchObject
The return type of e.g.
re.matchorre.search.- Returns:
str :
The string returned from
match.group()if it end with'f', else the string with'f'appended.