StringFunctions example clearly incapable of converting to anything but lowercase.
I'll keep it brief. Here you invoke operation.lower(), which presumably you wouldn't want for the Upper, Capitalize, Title, and SwapCase use cases.
(Never mind that all this mucking about with macros just to get case conversion shouldn't even be necessary in the first place...)
Due to inactivity this issue will be closed in 7 days
Ugh.
Can you include a test case that demonstrates the problem? Sorry for not putting any attention on this. Are you sure the referenced code isn't just lowering the name of the operation?
Ohhh nooo.
Right, I'm an idiot. Closest to a retort I can come back with is "A comment or two wouldn't kill you". 😅
Annnnyway, in case anyone else needs convincing, a test case:
#!/bin/env python3
import handler
for operation in ["Upper", "Lower", "Capitalize", "Title", "SwapCase"]:
event = {
"requestId": "whatever",
"params": {
"Operation": operation,
"InputString": "hElLo wOrLd",
}
}
response = handler.handler(event, None)
print(f"{operation}:\n\t {event=} {response=}")