Note that attribute being requested is 'myfunc()', not 'myfunc', so the rules about when __getattr__ gets called are being obeyed.
But yes, %autocall is risky. We could probably do a better parsing of the name and avoid going through ofind() if the name isn't just a valid.python.dotted name.
To be clear, this is the output:
In [10]: %autocall
Automatic calling is: Smart
In [11]: f.myfunc()
Getting 'myfunc()'
myfunc()
Note that attribute being requested is 'myfunc()', not 'myfunc', so the rules about when __getattr__ gets called are being obeyed.
But yes, %autocall is risky. We could probably do a better parsing of the name and avoid going through ofind() if the name isn't just a valid.python.dotted name.