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

[Metaprogramming] Monkey patching #15

Closed
2 tasks
ch3njust1n opened this issue May 31, 2023 · 1 comment
Closed
2 tasks

[Metaprogramming] Monkey patching #15

ch3njust1n opened this issue May 31, 2023 · 1 comment

Comments

@ch3njust1n
Copy link
Owner

ch3njust1n commented May 31, 2023

Definition: This involves changing or extending the behavior of code at runtime, typically by adding, replacing, or modifying methods or attributes in a class or object.

Example:

class MyClass:
    pass

def new_method(self):
    print("New method")

MyClass.new_method = new_method
instance = MyClass()
instance.new_method() # Prints: "New method"

Task:

  • LLM generates the new_method and returns a pointer to the function from exec() and assigns to MyClass.new_method
  • Add example to documentation
@ch3njust1n ch3njust1n self-assigned this May 31, 2023
@ch3njust1n ch3njust1n changed the title Monkey patching [Metaprogramming] Monkey patching May 31, 2023
@ch3njust1n
Copy link
Owner Author

This issue is too broad is was completed in the following features: #10, #16, #17, #18, #19, #21, #41, #43

#20 is low priority and will be done later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant