Skip to content

Commit

Permalink
Added special functions description in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AryazE committed Mar 27, 2024
1 parent 24f1054 commit 2897dd0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dynapyt/analyses/TraceAll.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,8 @@ def pre_call(
self, dyn_ast: str, iid: int, function: Callable, pos_args: Tuple, kw_args: Dict
):
"""Hook called before a function call happens.
This hook is not called for a set of special functions.
These special functions are 'breakpoint', 'dir', 'eval', 'exec', 'globals', 'help', 'locals', 'super', 'vars'.
Parameters
Expand Down Expand Up @@ -887,6 +889,9 @@ def post_call(
kw_args: Dict,
) -> Any:
"""Hook called after a function call.
Note: For a set of functions, that cannot be called from DynaPyt's runtime engine, the 'call' argument is not 'Callable', but is the resulting value.
These special functions are 'breakpoint', 'dir', 'eval', 'exec', 'globals', 'help', 'locals', 'super', 'vars'.
To check for these cases, you can check 'result is call', and if it is True, then it is one of these special functions.
Parameters
Expand Down

0 comments on commit 2897dd0

Please sign in to comment.