I'm getting an issue where lambda throws a "'module' object is not callable" error when I decorate a function with the multimethod decorator. I created an arbitary example to recreate this issue.
import json
from multimethod import multimethod
@multimethod
def test(word: str):
print("you called string version", word)
def lambda_handler(event, context):
test("hello")
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}
If I remove the decorator it works. For some reason my function gets treated as a module as soon as I decorate it. I'm using layers to include multimethod but I don't think that's the issue since other decorators have worked before.