Python Programming Tutorial – 37 – Constructors

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






26 responses to “Python Programming Tutorial – 37 – Constructors”

  1. David Song Avatar

    This is No. 100 comment!

  2. aahana nawab Avatar

    What if the class 'new' had multiple functions?

  3. Rick Burns Avatar

    Hi Bucky, I m learning like crazy ,,, thanks so much for this ,, super teacher!…I have a small problem if you are here…I cant get the Constructor to wor on 2.7…can you help…? or anyon pleaseeees?

  4. Renfield Meloy Goodman Avatar

    holy fuck. I watched like 4 videos and just in this example it makes sense!

  5. MacVsPc Avatar

    __Mifflin__ lol (like if you get it)

  6. kishore Hansda Avatar

    hey ..what is clear screen command to clear screen??

  7. no name Avatar

    the best explanation on constructors ive had yet. ty so much

  8. Lukasz Staszewski Avatar

    you forgot to say about the ''def _str_(self):'', but that's not bad, 'cause I almost never use this method.

  9. Pranshoo Verma Avatar

    if both different classes have same function name and then 3rd class is derived from both the classes then what would happen??would there be diamond ambiguity??

  10. Daniel Monteiro Avatar

    what is that whisper at 3:26 ?

  11. angelorf Avatar

    The names you use for variables are really distracting. Calling a class 'new', letting a child object saying it is a mom, letting the init function say it's a constructor, having the apples function of a swine say "beef pie". This is really not helping in understanding why these constructs are handy and when to use them.

    You shouldn't think the variable names don't matter. Please try to come up with better examples next time.

  12. Mateusz Korolow Avatar

    _init_() is not the constructor!!! is metod (like constructor) but run after ctreatig object !

  13. Nikhil Madaan Avatar

    i had written def__init__(self):
    the python shows syntax error: invalid syntax

    I m using python 3.4.3 so what should i use… pls guide

  14. Khairul Imam Avatar

    excuse me, what is self args means?

  15. Music Cave Avatar

    this guy is awesome!

  16. George Field Avatar

    if i wanted to loop a input/method if a certain string/number was outside specifications can i?
    for example:

    class defence:
        def _init_(self):
            print 'please fill in: '
            print str('YOU') + '.name('
            print str('YOU') + '.age('
            print str('YOU') + '.gender('
        def name(self,name='0'):
        def age(self,age=18):
            if age < 18:
    HERE–> how can i get it to loop back to the method 'age'?????         
        def gender(self,gender='0'):
        def data(self):
            print 'This ' + str(self.gender) + 's name is ' + str(
            print 'This ' + str(self.gender) + 's age is ' + str(self.age)

    class army(defence):

    class navy(defence):

    class RAF(defence):

  17. xTkRePlayZ Avatar

    this is made 2008 but uploaded 2009?? whuuuuuut

  18. rida simmou Avatar

    Thanks a i was really struggling with this 🙂 

  19. Shrillwhip Avatar

    You're really shedding some light on this concept for me. Thanks, man.

  20. aquarius Avatar

    i suppose you don't need to use 'self' as self, i replaced 'self' with 'phuck' and it still works.

  21. Brandon Perreault Avatar

    If your watching this video in 2014, that swine flu comment seemed random as fuck great tutorial btw!!

  22. RebeccasPanda Avatar

    Read the second comment I made please. It concurs with your statement.

  23. RookieN08 Avatar

    What about its web framework Python Django?? As far as I know, a lot of programs are coded in C++ and Java lol

  24. RebeccasPanda Avatar

    Although this comment isn't incorrect, it misrepresents the actuality of Python's practical application and the methodology for appropriate/specific instantiation in programming. Please remember that semantic diversity in programming exists because certain languages are better at certain operations than others.

Leave a Reply

Your email address will not be published. Required fields are marked *