Skip to content

Matching/ArgThat to accept eval() strings #5

@Xion

Description

@Xion

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions