Builtin functions can not be used for pre_call hooks
FlxB2 opened this issue · 2 comments
FlxB2 commented
There is a check at line 641 in CodeInstrumenter.py which always assigns the value True to the only_post
argument for the _call_()
hook if the methods qualified name is builtin. Is there a reason for that?
I would like to get notified via pre_call if a builtin function (e.g. open()
) is called.
However, pre_call is not utilized if only_post
is true.
If this is intentional the functionality does not work for functions of builtin data types, e.g. [].append("something")
.
FlxB2 commented
Potential fix can be found here FlxB2@1dd3bd9