@staticmethod explained in Python

preview_player
Показать описание
In this video I'm going to be teaching you how to use @staticmethod in Python!

▶ Become job-ready with Python:

▶ Follow me on Instagram:
Рекомендации по теме
Комментарии
Автор

Just a few thousands more of this tips and I might end up as a Python pro.

BerndKircher
Автор

These short video are very nice and usefull. Thank you very much

davidl
Автор

I ignore my IDE and almost never use @staticmethod. What am I missing out on?

iNuchalHead
Автор

What is the plug-in name that shows how many times a function is referenced?

evanter
Автор

It's interesting that they're copying more and more of C++. I don't know if that's a good thing or a bad thing, but it's certainly interesting.

anon_y_mousse
Автор

Useful decorator for code organization, thank you.

AZ-ifmj
Автор

It's fine sir. please make videos on python with "Apache Airflow" for beginners

puneethku
Автор

Could you explain static class attributes? I'm unsure if they're actually called that, but it's when you create a variable in a class before __init__(). I feel like it's something that's never talked about and I don't know if it's considered good practice when making a singleton class. It has helped me when making a save manager in a application project with a very modular structure

wolfmyths
Автор

This is gold for Class approach! Appreciated!

loverboykimi
Автор

when your method has no dependence on any of your instance attributes, then the program will suggest you to make it staticmethod, that's the whole point about it. Even better if you can explain the difference bettween staticmethod and class method, where to use them respectively

MindfreeLetsgo
Автор

very well explained, for someone who comes from other languages. thx alot!

WMcLovin
Автор

So the difference between static method and class method is the ability to reference class level attributes?

kamurashev
Автор

Все равно, так и не понял смысл этого. Для чего нужен @staticmetod? Без него нельзя создать метод в классе?

_mrmark