Skip to content

Allow attribute definition in any method #171

Closed
@JukkaL

Description

@JukkaL

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions