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

Allow attribute definition in any method #171

Closed
JukkaL opened this issue Jul 3, 2013 · 0 comments
Closed

Allow attribute definition in any method #171

JukkaL opened this issue Jul 3, 2013 · 0 comments
Labels

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Jul 3, 2013

Currently attributes can be defined by assigning via self in the __init__ method. This should be extended to all methods, in order to improve compatibility with Python:

class A:
    def __init__(self) -> None:
        self.x = 1 # Ok, define x
    def foo(self) -> None:
        self.y = 'a' # Ok, define y
@JukkaL JukkaL closed this as completed in 6b2afb2 Jul 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant