Intermediate Python Tutorial #2 - Static and Class Methods

preview_player
Показать описание
Welcome to a new series! Intermediate Python Tutorials!

Today's Topic: static and class methods, these are different types of method that you can use within a class. They are especially useful when doing OOP programming and have many use cases.

In this set of videos I will be explaining more advanced programming concepts and showing you intermediate-advanced tools that you can use in python. A lot of these tools will help you to solve problems/code more efficiently and will save you a ton of time!

Future topics:
3. Map Function
4. Filter Function
5. Lambda Functions
6. Intro to Collections
7. Collections: named tuple
8. Collections: deque
9. Collections: orderedDict
10. Collections: defualtDict
11. docstrings

Want To Support This Channel?
Bitcoin: 1PbkAYLFaJBgjbKn2ptGyBz65xWN8hJgBU
Ethereum: 0xdd42dbbdba60f7163fc7a840e189474b6e8bfcad
Ripple: rD4arM9CVjQWqi8f1kxdpCgkCgEkqBgtud

Please leave a LIKE and SUBSCRIBE for more content!

Tags:
- Tech With Tim
- Pygame
- Python Tutorials
- Intermidiate Python Tutorials
- static and class methods
- static methods vs class methods
- object orientated programming
- objects in python
- classes in python
- python intermediate
Рекомендации по теме
Комментарии
Автор

Your channel is soo underrated! You deserve more attention!

tomershechner
Автор

You explained it easier than others, thanks!

neoquam
Автор

Awesome tutorial and more easily understandable. Thanks for the tutorials. Keep uploading the videos on weekly basis

dhanavignesh
Автор

Great content. Many thanks. What confused me (being quite new to Phyton) in the beginning was that you have to know that the display() method is NOT a staticmethod, even though for a newbie it looks like that as it is written right after the other staticmethod

Christian-cueo
Автор

so amazing trust me i watched your 2-3 videos and then i thought you must have at least 300k - 400k subs....
but when i saw only 7.3k I literally shocked. I shared your videos with all of my friends...  Keep it up.... lots of love and wish you all the best...

CyberWorldwithPratik
Автор

you're awesome bro! extremly underrated channel

bogdanandrei
Автор

An interesting topic. I'm a C# developer trying to grasp python. In C# we have static, I almost tend to look at static as being tied to type (class), and non-static methods being tied to an instance. At first I thought the worst, that you were explaining it backward, but in python you can reference in a third way?

Let me explain, in C#, instance.age() might return the age of the person from a given instance of the class,
while static int age(person) would instead interrogate that person handed in to determine the age. the latter not being tied to the instance of the object.

So in python, you can infer a type variable outside an instance, but implicitly because it's defined within the type?

Interesting, thanks for the share! =)

valleykid
Автор

Anybody getting stressed by the white idle background? click,
1. Options
2. Configure IDLE
3. Highlights
4. Click IDLE classic and click IDLE dark!
You can also customize the colour of the functions, text etc by clicking the normal code or text and choose what colour you want.

Hope this helped you since it helped me. like, by a LOT.

sciencedoneright
Автор

Thanks so much Tim, am new to your channel but thanks so much

codewarrior
Автор

if there anybody from 2021 learning python, if these examples and explanations aren't very understandable check out a "Bythe Of Python" classes part then you can continue this tutorial, i did so, and it helped!

berdibekcc
Автор

Thank you Tim for the tutorial...God bless

ibekwevictor
Автор

Aren't you supposed to capitalize "person" because it is a class??

MrChristian
Автор

Great channel. P.S: Your code should conform to PEP8.

Algoritmik
Автор

Static methods applies to all instances of the class. Non static methods are also different. Quite different to a non static method.

The_Debug_Life
Автор

Love your tutorials. I happened to notice static is misspelled at the top. No big deal or anything misspellings usually just pop out for me.

artistpw
Автор

For static method, we can simply call the class name
class person (object):

print(person.isAdult( ))

wongkingshun
Автор

Thank you very much! These tutorials are truely excellent!

rotrose
Автор

nice tutorial amaaaazing btw didyou activate windows? i hope you did with alll the support...

chonkboi
Автор

Hey Tim is there some chance of you do some c# tutorials ?

pedropc
Автор

Thanks man, really appreciate information in simplified version

asoli