Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching/ArgThat to accept eval() strings #5

Open
Xion opened this issue Nov 30, 2015 · 0 comments
Open

Matching/ArgThat to accept eval() strings #5

Xion opened this issue Nov 30, 2015 · 0 comments
Labels

Comments

@Xion
Copy link
Owner

Xion commented Nov 30, 2015

Essentially:

ArgThat('x % 2 == 0')

Caveats:

  • Scoping. It's probably best if the compiled closure didn't include local scope of the matcher ctor invocation, but it should still include global scope (for imported modules).
  • Name of the placeholder/argument variable could be deduced intelligently (it'd be the sole unbound variable), but it probably requires tricks with the Python code object.
@Xion Xion added the idea label Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant