Skip to content

Conversation

@michaeldiamant
Copy link
Contributor

Snapshots an unsuccessful attempt to use functools.partial as an alternative to #335.

Since the approach doesn't appear to work, I'm opening + closing the PR for illustrative purposes.

  • Based on the ~30min I spent here, it seems partial functions added outside of a class is less well supported. Or at least I don't quite grok how to do it.
  • I attempted several variations on what's shown here. I think the crux of the problem is capturing the cls instance when outside the scope of the referred-to-class.

Since partial function application didn't work as intended, I also spent a few minutes considering a monkey patching solution to preserve invoking a method against DryrunExecutor. That also didn't exactly pan out and I ended up aborting.

I suspect there is a path here. Though I felt it was taking longer than warranted for the problem at-hand. I plan to reconsider the topic over time.

@michaeldiamant michaeldiamant deleted the blackbox-abi_pytealer_api_partial_example branch May 12, 2022 19:50
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