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

Language feature: Decorators #2

Closed
tusharsadhwani opened this issue Aug 4, 2023 · 0 comments · Fixed by #26
Closed

Language feature: Decorators #2

tusharsadhwani opened this issue Aug 4, 2023 · 0 comments · Fixed by #26

Comments

@tusharsadhwani
Copy link
Owner

tusharsadhwani commented Aug 4, 2023

Implementing decorators would be pretty simple.

Adding syntax sugar for:

@foo
def function():
   ...

To mean:

def function():
    ...

function = foo(function)

There are some caveats (the variable function is not supposed to be defined when the decorator foo is running), but essentially that is the feature.

@tusharsadhwani tusharsadhwani changed the title Decorators Language feature: Decorators Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant