learner.feed(f(points))
The equivalent for 'if' helps with the regex matching case:
if re.match(r"...") as m:
print(m.group(1))
I considered proposing these two forms in a PEP a few years ago, but never got around to it. To my eye, they fit syntactically into the language as-is, without introducing new symbols, operators or keywords, are consistent with existing usage, and address two relatively common causes of displeasing Python code.