callee icon indicating copy to clipboard operation
callee copied to clipboard

Matching/ArgThat to accept eval() strings

Open Xion opened this issue 10 years ago • 0 comments

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 avatar Nov 30 '15 04:11 Xion