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

Unable to curse __call__ #73

Open
MrFizzyBubbs opened this issue Mar 26, 2023 · 0 comments
Open

Unable to curse __call__ #73

MrFizzyBubbs opened this issue Mar 26, 2023 · 0 comments

Comments

@MrFizzyBubbs
Copy link

MrFizzyBubbs commented Mar 26, 2023

Attempting to curse the __call__ method results in a KeyError. Minimum working example below.

def wrap(func):
    def wrapped(*args, **kwargs):
      print("intercepted")
      return func(*args, **kwargs)
    return wrapped

curse(int, "__call__", wrap(int.__call__))
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

No branches or pull requests

1 participant