Skip to content

Commit 0faed1a

Browse files
committed
Add comments
1 parent 1f52c1d commit 0faed1a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pythonwhat/check_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def check_function(name, index=0,
5656
in case the function parameters were not successfully matched.
5757
expand_msg (str): If specified, this overrides any messages that are prepended by previous SCT chains.
5858
signature (Signature): Normally, check_function() can figure out what the function signature is,
59-
but it might be necessary to use build_sig to manually build a signature and pass this along.
59+
but it might be necessary to use ``sig_from_params()`` to manually build a signature and pass this along.
6060
state (State): State object that is passed from the SCT Chain (don't specify this).
6161
6262
:Examples:

pythonwhat/check_syntax.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def wrapper(*args, **kwargs):
4646
class Chain:
4747
def __init__(self, state):
4848
self._state = state
49-
self._crnt_sct = None
49+
self._crnt_sct = None # last called SCT
5050
self._waiting_on_call = False
5151

5252
def _double_attr_error(self):
@@ -91,6 +91,7 @@ def __init__(self, stack = None):
9191

9292
def __call__(self, *args, **kwargs):
9393
if not self._crnt_sct:
94+
# first function in chain
9495
state = kwargs.get('state') or args[0]
9596
return reduce(lambda s, f: f(state=s), self._stack, state)
9697
else:

0 commit comments

Comments
 (0)