Skip to content

Public method in private class? #1194

@Akuli

Description

@Akuli

Should this be allowed?

class Foo:
    @public
    def bar(self) -> None:
        printf("Hi\n")

Now other files can call the bar() method, but only if they get an instance of Foo from somewhere first because Foo is private.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions