Open utterances-bot opened 5 years ago
Hi, I tried to follow your code to recreate the way you understood the dynamic functions. However I got a different response when i executed : signature(FunctionType) . I got an error, "no signature found for builtin type <class 'function'>". Could you please help me figure out how you go the signature to work.
This is an inspect
bug that was fixed by this commit.
I suspect that you've been using Python 3.6 or an older version to execute the code snippets, which would explain why you ran into this issue. The problem should disappear if you upgrade to 3.7 🙂 (@Ankita10)
Python Tips: Dynamic function definition - Philip Trauner
Function definition in Python can be considered static, right? Wrong!
https://philip-trauner.me/blog/post/python-tips-dynamic-function-definition