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

@register_xnmt_event problems #570

Open
philip30 opened this issue Apr 17, 2019 · 0 comments
Open

@register_xnmt_event problems #570

philip30 opened this issue Apr 17, 2019 · 0 comments

Comments

@philip30
Copy link
Contributor

philip30 commented Apr 17, 2019

class A:
    @register_xnmt_handler
    def __init__(self, a):
        self.a = a

class B(A):
    @register_xnmt_handler
    def __init__(self, a, b):
        super().__init__(a)
        self.b = b
    
    @handle_xnmt_event
    def on_f():
        self.b = 2 * self.b

# on_f on class B will be called twice, not sure if this is intended
f()
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