Python Programming Tutorial – 33 – Classes and Self

///Python Programming Tutorial – 33 – Classes and Self

Python Programming Tutorial – 33 – Classes and Self

FavoriteLoadingAdd to favorites

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –

source

By |2020-08-08T08:47:41+00:00August 8th, 2020|Python Video Tutorials|48 Comments

48 Comments

  1. Brent Kohler布伦特科勒 August 8, 2020 at 8:47 am - Reply

    the convention is to name a class with a capitalized variable

  2. G Geo August 8, 2020 at 8:47 am - Reply

    Bucky, You are my personal hero.

  3. Rhino Alestorm August 8, 2020 at 8:47 am - Reply

    this is one of the best tutorials I've seen in my life

  4. Izaias de Oliveira Elias August 8, 2020 at 8:47 am - Reply

    comment this code:

    import http.server
    import socketserver
    import os

    PORT = 8000
    Handler = http.server.SimpleHTTPRequestHandler
    class index:
    def index(self, index):
    self.index = index.html
    self.path("/")
    self.file("/index.html")

    with socketserver.TCPServer(("", PORT), Handler) as httpd:
    print("serving at port", PORT)
    httpd.serve_forever()

  5. Excuse the Accent August 8, 2020 at 8:47 am - Reply

    "bucky" and "tony" seems like a good matchup for a fight……

  6. Ajay Bhandari August 8, 2020 at 8:47 am - Reply

    whats the python version …cause when i wrote this code its just a blank in my console screen

  7. Vignesh Allam August 8, 2020 at 8:47 am - Reply

    Coolest video ever short and sweet

  8. Alex Kemos August 8, 2020 at 8:47 am - Reply

    Finally a good explanation after spending 2 days trying to figure out what works and what doesn't

  9. Mangosuthu Buthelezi August 8, 2020 at 8:47 am - Reply

    I know your voice!! You used to do electronics videos. Is that right?

  10. aZa August 8, 2020 at 8:47 am - Reply

    thanks so much!

  11. ali hashmi August 8, 2020 at 8:47 am - Reply

    nailed it man!

  12. Zabolotnii Alexandru August 8, 2020 at 8:47 am - Reply

    This is the best explanation ever ! i just subscribed.

  13. Yon Yi August 8, 2020 at 8:47 am - Reply

    I've been so confused with self in python and and I'm still confused but this is probably the clearest and easiest vid to understand so far thanks!

  14. Mike Shin August 8, 2020 at 8:47 am - Reply

    Hey boss. You are clear and it was very clear to me. Thanks as I’m learning Python. 🙂

  15. Keith Lyons August 8, 2020 at 8:47 am - Reply

    Still the best! Thanks Bucky.

  16. Colm McCormack August 8, 2020 at 8:47 am - Reply

    WOW!! I googled this so much, and only got more confused before I came here….Thanks!

  17. Tonni Lam August 8, 2020 at 8:47 am - Reply

    Best explanation for self ever

  18. Ahmed Abozeid August 8, 2020 at 8:47 am - Reply

    I am watching it in 2019 (7 days to 2020) and still learning a lot from a video published 2009

    Thanks man

  19. Chandrasekhar Reddy August 8, 2020 at 8:47 am - Reply

    How we can call a method by passing 2 objects

  20. onee August 8, 2020 at 8:47 am - Reply

    I saw in another tutorial that self refers to class.

    "className" is a very generic name, but if you had named your class for example "Person". According to that other tutorial it basically is saying "self.name = name" which is the same as "Person.name = name".

    And if you assigned the class to "firstPerson" instead of "first", you were basically typing "firstPerson.name = name".

    If this explanation confuses you, please ignore it.

  21. Nitesh Kumar August 8, 2020 at 8:47 am - Reply

    Best explanation.

  22. James Tobin August 8, 2020 at 8:47 am - Reply

    I have been searching for a clear explanation of self for a long time. This video is the first one I’m happy to show my students.

  23. Sanaur Rahman August 8, 2020 at 8:47 am - Reply

    Every time I tried to run the code through Python 3.7.4 Shell and I get these Red-line Errors such as SyntaxError or NameError or sometimes it says : name 'def__init__' is not defined, how do I fix them.?

  24. Pankaj Joshi August 8, 2020 at 8:47 am - Reply

    What is self ?

  25. Joshua Newton August 8, 2020 at 8:47 am - Reply

    Great tutorial

  26. Peggward August 8, 2020 at 8:47 am - Reply

    What an absolute God. You made this video while I was barely learning multiplication. Crazy to think I'd be using it 10 years later.

  27. Doubloon Conroy August 8, 2020 at 8:47 am - Reply

    The best explanation of self in the history of the best explanations of self

  28. kamil ibrahim August 8, 2020 at 8:47 am - Reply

    I'm really appreciate because am happy to be in good conditions

  29. R S August 8, 2020 at 8:47 am - Reply

    Helps a ton, thanks bud. The lesson from codecademy wasn't really clear on this part.

  30. Jagadish Chandra Sabat August 8, 2020 at 8:47 am - Reply

    Great explanation..!

  31. AGNEE August 8, 2020 at 8:47 am - Reply

    Why 80 dislikes?? Someone's hard work to help you learn FREE OF COST is against your religion??

  32. dimonat August 8, 2020 at 8:47 am - Reply

    I finally understand self woot woot

  33. Nizam knr August 8, 2020 at 8:47 am - Reply

    I was very confused on 'self'… now it is clear. thank u

  34. Jay Pithva August 8, 2020 at 8:47 am - Reply

    If you Like This video…You Also Like This..nice video
    https://www.thebabatalks.com/2019/05/variable-classes-in-tkinter.html

  35. cd c August 8, 2020 at 8:47 am - Reply

    It's good idea to write like this

    class Personn:
    def __init__(self, name):
    self.name = name
    def getName(self):
    return self.name
    def setName(self, name):
    self.name = name
    def sayHello(self):
    print("Hello %s" % self.name)
    a = Personne("Bucky")
    print (a.getName())

    a.setName("Lolo")
    print (a.getName())

  36. gabrielle moran August 8, 2020 at 8:47 am - Reply

    Even though it is ten years later and I'm learning in Python 3 this is still the best explanation of 'self' I have seen yet!

  37. Christopher Kiel August 8, 2020 at 8:47 am - Reply

    Realy good. I understand for the first time the "self" concept. Thanks!!!

  38. Imtiaz Ahmed Khan August 8, 2020 at 8:47 am - Reply

    Bucky is the best!!! Thank you so much for your explanation

  39. Stelios TB August 8, 2020 at 8:47 am - Reply

    How can i refer to a hole class tho?

  40. J G August 8, 2020 at 8:47 am - Reply

    OMG. I could probably cry rn. I am currently learning python with M1m0 and didn't understood this. Thy dude for this great explaination!!

  41. Timon Sanchez August 8, 2020 at 8:47 am - Reply

    "self is a place order for the object"

  42. Habeeb Ulla August 8, 2020 at 8:47 am - Reply

    it was useful, thankyou:)

  43. wild life August 8, 2020 at 8:47 am - Reply

    YOU have just saved me from punching through the computer screen, you are amazing

  44. HJ P August 8, 2020 at 8:47 am - Reply

    Relationship between class and self
    – Class is collection of function and we can use this bunch of function with object(self). So If it can clearly help for time of develope in various of object

  45. Song Wang August 8, 2020 at 8:47 am - Reply

    best

  46. Patrick Chen August 8, 2020 at 8:47 am - Reply

    if you are using a class for an object, obviously method you called using the object name is for this object, why do we still need to add self to make this more complicated? What's the benefit of using Self than?

  47. Nirbhay Pandya August 8, 2020 at 8:47 am - Reply

    Thank you 🙂

  48. Bin Wang August 8, 2020 at 8:47 am - Reply

    This is a good one on 'self' explanation.

Leave A Comment

*