Skip to content

Feature has context#198

Merged
machow merged 10 commits intomasterfrom
feature-has-context
Mar 7, 2017
Merged

Feature has context#198
machow merged 10 commits intomasterfrom
feature-has-context

Conversation

@machow
Copy link
Copy Markdown
Contributor

@machow machow commented Mar 6, 2017

address issue #187. Implements a function has_context, which checks the names of iterator/context variables. Uses single dispatch to do customized tests if called from a node directly (e.g. check_with(0).has_context()).

Copy link
Copy Markdown
Contributor

@filipsch filipsch left a comment

Choose a reason for hiding this comment

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

Looks good.
You're not simplifying the test_with() function?

@machow
Copy link
Copy Markdown
Contributor Author

machow commented Mar 6, 2017

@filipsch
Copy link
Copy Markdown
Contributor

filipsch commented Mar 7, 2017

Okay but you're not leaving out the too_many part, that is the 'difference' between the test_with and the composed check_ functions. I remember we talked about making the 'mapping very clear', and this could mean cutting out some stuff here and there, based on whether some SCTs that are currently in production are using this.

@machow
Copy link
Copy Markdown
Contributor Author

machow commented Mar 7, 2017

Ah, I see--I just now changed it to use the helper SCT has_equal_part_len (which was being used in the comprehension tests). We can expose it to SCT creators. I'm fine with a long name for it, but let me think about what to call it for a bit...

@machow machow merged commit 0d96047 into master Mar 7, 2017
@machow machow deleted the feature-has-context branch April 12, 2017 19:30
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