Skip to content

Feature check function - #180

Merged
machow merged 6 commits into
masterfrom
feature-check-function
Jan 4, 2017
Merged

Feature check function#180
machow merged 6 commits into
masterfrom
feature-check-function

Conversation

@machow

@machow machow commented Jan 4, 2017

Copy link
Copy Markdown
Contributor

Passes on validator. Once it looks good to merge, let me know, so I can bump version number.

Comment thread pythonwhat/check_function.py Outdated
"You might have to manually specify or correct the signature."
.format(index=index, name=name))

# TODO if can't parse sig, send failed test msg

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this todo still a todo?

@filipsch filipsch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't the find the bit where signature = FALSE kicks in by falling back on matching keywords and arguments, but I trust the tests to pass.

@machow

machow commented Jan 4, 2017

Copy link
Copy Markdown
Contributor Author

The parser pulls out args for lambdas, function definitions, and calls. signature = False falls back by not replacing these args with the ones divined from the function signatures. In otherwords without a signature, you can ask whether people specified a first positional argument, or a keyword named "c", etc.. But if a person passed only a positional argument, you couldn't know it corresponds to the signature parameter "c".

@machow
machow merged commit ef3cf4a into master Jan 4, 2017
@machow
machow deleted the feature-check-function branch January 4, 2017 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants