Python Programming Tutorial – 30 – init

///Python Programming Tutorial – 30 – init

Python Programming Tutorial – 30 – init

FavoriteLoadingAdd to favorites

Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts

By |2017-05-23T21:49:07+00:00May 23rd, 2017|Python Video Tutorials|50 Comments

50 Comments

  1. Ngan Nguyen Ngoc May 23, 2017 at 9:51 pm - Reply

    Thank you for teaching !!!

  2. Tuan Nguyen Minh May 23, 2017 at 9:52 pm - Reply

    Jason is evil :))

  3. Cavid Hüseynov May 23, 2017 at 9:55 pm - Reply

    thanks!

  4. kareem selim May 23, 2017 at 9:55 pm - Reply

    الف سلامة هههه

  5. P K May 23, 2017 at 9:56 pm - Reply

    so _init_ is like a constructor in C++ ?

  6. AdamJMC Gross May 23, 2017 at 9:57 pm - Reply

    init stands for initialize

  7. Gourabo-idiot May 23, 2017 at 10:01 pm - Reply

    Tuna……Tuna………………….I love Tuna
    But seriously solve this:
    Question) Is class Tuna and class Tuna() the very same stuff ?

  8. Plinko Penguin May 23, 2017 at 10:03 pm - Reply

    ‘ello gov’na, this is a good tutorial, init?

    ("innit?" is all I could think of through this entire tutorial, lol.)

  9. Mohamed Zaki May 23, 2017 at 10:03 pm - Reply

    Why can’t we just create a for loop in the def get_energy with a variable called self.energy instead of the init function?

  10. ShinyKid May 23, 2017 at 10:04 pm - Reply

    Found your tutorial awesome. Sometimes I can’t understand people well as I’m not a native english speaker. Although my english isn’t that good I could understand you pretty well, and I got with ease how a class works in python. Thank you very much for your very useful tutorial.

  11. Nick Turner May 23, 2017 at 10:05 pm - Reply

    Hi new boston I been stuck on understanding classes for ages !!! and I have paid for material I come on here watch your video and bam ! I finally understand Amazing content dude I would pay for your series it’s fantastic thank you very much for all your effort I’m sure I’m not the only one here that appreciates it

  12. parasque127 May 23, 2017 at 10:05 pm - Reply

    can anyone please dumb down __init__ (self): to me?
    iim new to this whole pythong but what im so far understandnig is that each time u call the class Tuna, the first thing the class does is to run init first?

  13. Kingsley's Tech Channel May 23, 2017 at 10:08 pm - Reply

    lol he said he thinks init stands Instantiation and then he says he sees it as initialisation, which is actually what it stands for.

  14. 李威 May 23, 2017 at 10:10 pm - Reply

    clean,simple,tight,I don’t know what to call this ,definitely the best Python Tutorial I have ever seen!

  15. Vladi Ivanov May 23, 2017 at 10:13 pm - Reply

    init = constructor

  16. kelvin owusu May 23, 2017 at 10:13 pm - Reply

    is self the same as this in JavaScript

  17. Abdall H May 23, 2017 at 10:15 pm - Reply

    think’s for this tutorial
    !!! and i hope you get well soon

  18. Josiah McGlothin May 23, 2017 at 10:15 pm - Reply

    *came to the comments to look for a Jason that was offended*

  19. Sadanand Walke May 23, 2017 at 10:16 pm - Reply

    i typed the same code still im getting an error..And it says this

    C:UsersadminAppDataLocalProgramsPythonPython36-32python.exe C:/Users/admin/PycharmProjects/untitled1/sada.py
    Traceback (most recent call last):
    File "C:/Users/admin/PycharmProjects/untitled1/sada.py", line 8, in <module>
    jason = Enemy (5)
    TypeError: object() takes no parameters

    Process finished with exit code 1

  20. Sebi20070 May 23, 2017 at 10:20 pm - Reply

    I already know java quite well so i got a little bored during the 10 videos before that, but if you are new to programming, these videos are the best. Easy to understand, friendly and funny, motivating. Really nicely done bucky!

  21. true.thinker May 23, 2017 at 10:20 pm - Reply

    You are the best!!

  22. Xiaohong Chen May 23, 2017 at 10:26 pm - Reply

    Hi.Bucky, can u give more detail about "self"?

  23. Talha Studios 2 May 23, 2017 at 10:31 pm - Reply

    Man you made 4000 tutorials that is normal thing that happened to your hands

  24. AdamJMC Gross May 23, 2017 at 10:32 pm - Reply

    init stands for initialize

  25. Eyal Pery May 23, 2017 at 10:32 pm - Reply

    Perfect

  26. Strožer Jože May 23, 2017 at 10:32 pm - Reply

    If it wasn’t for you, i would fail my highschool.

  27. Zachariasz Robak May 23, 2017 at 10:33 pm - Reply

    What is a difference between using init and making it a "normal" function and using it to assign energy to enemy manualy? I do not see the advantage other than shortening the code.

  28. Satyam Garg May 23, 2017 at 10:35 pm - Reply

    after video no.29 they are not present in 1080p

  29. They Pheaktra May 23, 2017 at 10:35 pm - Reply

    Can anyone explain me, what happens if we set two value in the same init?
    I got error when i tried to set one more ‘y’ value in the same Object
    As: def __init__(self, x, y):

  30. Matthew Dettman May 23, 2017 at 10:35 pm - Reply

    Thanks for posting, it really helps out seeing your examples!

  31. Neosiq May 23, 2017 at 10:36 pm - Reply

    "Maybe its the movie, maybe i’m stereotyping, or maybe its true, who knows?" – maybe its JASON BOURNE!!!!!!!!!!!

  32. Marcin Migacz May 23, 2017 at 10:36 pm - Reply

    so sweet ! 😀 Love it ! 😀 thanks a lot! 🙂

  33. CBorgZ May 23, 2017 at 10:36 pm - Reply

    Hey Bucky..
    why your fish says "Blrrblrlbrlbrbr" if she knows human language
    and can say "I am swimming" ?
    This situation is not correct )))

  34. Sean Corcoran May 23, 2017 at 10:38 pm - Reply

    Thank you so much for your Python Tutorial series! I have been taking a Python class in college and have been watching your videos that correspond to my course topics for clarification. You do a great job clearly and concisely getting the point accross, particuarly for Object Oriented Programs. Keep up the good work my friend!

  35. Luckster 247 May 23, 2017 at 10:40 pm - Reply

    WOW I finally got it after a bunch of confusing tutorials!
    THANK YOU!

  36. the3lusive May 23, 2017 at 10:40 pm - Reply

    Vertical mouse …… back in the day we used to call them joysticks. 🙂

  37. fun Tertain May 23, 2017 at 10:40 pm - Reply

    For those of you confused about self, you can think of it as a reference to the outer environment keep in mind that functions have a local scope so if you want to access something outside the function you would have to do the self.variable.

  38. Retexz May 23, 2017 at 10:41 pm - Reply

    I dont understand, im retarded

  39. Dmitriy Ratushny May 23, 2017 at 10:41 pm - Reply

    How can I get this kind of Python, is it open source? The one I have is Shell version and it looks nothing like yours, im a total noobie so forgive my ignorance

  40. Cameron May 23, 2017 at 10:41 pm - Reply

    wanted to say thanks you tought me a lot of html/css and a lot of python better than some of the books did 🙂

  41. zark474 May 23, 2017 at 10:42 pm - Reply

    So the __init__ "method" acts like the class constructor from java?

  42. Joel Edwards May 23, 2017 at 10:42 pm - Reply

    Great Videos. Just learning Python using "Learn Python the hard way" book. Your explanations on Class (29 and 30) really drove home some issues in understanding it was going through.
    I will be looking at more of your videos. Thanks again.

  43. Kenneth Fleming May 23, 2017 at 10:43 pm - Reply

    so, let me give an example to see if i understand this correctly.

    lets take pokemon as an example, right. __init__ would be the pokemon’s sound that playes, and there would be a life counter (like you did in the previous episode, where itll display a message and take away 1 life). all of that would be under one class. then we can make the variable pikachu and do pikachu.(Whatever the class is), and itll work like that?

    does anyone understand what i mean lol

  44. RC Pelisco May 23, 2017 at 10:45 pm - Reply

    is __init__ like a Constructor in Java?

  45. norm carpet May 23, 2017 at 10:46 pm - Reply

    is self only used when referring to init functions etc

  46. Md Mazedul Islam Khan May 23, 2017 at 10:47 pm - Reply

    __init__(self) is exactly the same as constructor on PHP

  47. Arean a May 23, 2017 at 10:47 pm - Reply

    only one like for this Tutorial, really not fair! for long time I was struggling to get self and __init_ in my head… thank you..

  48. Satyam Garg May 23, 2017 at 10:48 pm - Reply

    after video no.29 they are not present in 1080p

  49. Hadley Hou May 23, 2017 at 10:48 pm - Reply

    I tried to type this code but it said TypeError: object() takes no parameters, i double checked code, can anyone explain what happened?

  50. Spork May 23, 2017 at 10:49 pm - Reply

    the only thing i don’t understand is (self)

Leave A Comment

*