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

Add modules #17

Open
emptybutton opened this issue Nov 14, 2023 · 0 comments
Open

Add modules #17

emptybutton opened this issue Nov 14, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request objects objects.py

Comments

@emptybutton
Copy link
Owner

Need to implement a constructor with similar behavior:

@module
class something:
    a = 5

    def add(a):
        return a * 2

    @val
    class sub_value:
        def add(module, b):
            return module.a + b

        class sub_sub_value:
            def add(module, b):
                 return module.a + b

    @obj
    class sub_object:
        c = 2

        def add(module, self, b):
            return (module.a + b) * self.c

    @module
    class sub_module:
        b = 4

        def add(module, b):
            return module.a + b

        @val
        class sub_sub_value:
            def add(module, sub_module, c):
                return module.a + sub_module.b + c
@emptybutton emptybutton added documentation Improvements or additions to documentation enhancement New feature or request objects objects.py labels Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request objects objects.py
Projects
None yet
Development

No branches or pull requests

1 participant