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

@staticmethod called as regular function (= outside the class scope?) #91473

Closed
Scharka opened this issue Apr 12, 2022 · 1 comment
Closed

@staticmethod called as regular function (= outside the class scope?) #91473

Scharka opened this issue Apr 12, 2022 · 1 comment

Comments

@Scharka
Copy link

Scharka commented Apr 12, 2022

553ee27

Do I understand correctly that (according to the docummentation) this should now work (in Python 3.10)?

class C:
    @staticmethod
    def f():
        print("Hi!")

f()

(I see there has probably been some fundamental discussion about this (#87848). I'm asking as a beginner just to grasp the concept/syntax correctly.)

Thank you for the clarification!

@AlexWaygood
Copy link
Member

Hi! This issue tracker is for bug reports and feature requests relating to Python. This is neither, so I'm going to close this issue — I recommend you ask your question here instead: https://discuss.python.org/c/users/7.

Good luck on your journey learning Python 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants