[ad_1]
I will explain the basics of Object Oriented Programming with Python. I cover the following : What is an object, class, private attribute, method and Encapsulation
Python 2.7 Tutorial Pt 7
by
Tags:
Comments
21 responses to “Python 2.7 Tutorial Pt 7”
-
Why define the main() function? If you execute your code without that 'if __name__' thingy, the code will just execute starting from line one. Exact same behavior.
-
I never got the point of encapsulation. You're protecting the code from… itself? Please give me a practical example where 'anyone' can change the values of an executing program.
-
Hi Darek , i would like to thank you for your tutorials, you helped me before with android tutorials and now you are doing it again with python, thank you so much, i have a question about OOP in python, what is the equivalent of package (in java ) for python ? for example I want to separate the class file and the file with the main function, how to do that ?
-
my job is also "forcing" me to watch your videos to get the basics of python 🙂
-
Hi Derek.. Thanks for awesome tutorials. But I am always confused in "classes", If it is possible could you please give some basics of class. It would be great.
-
The more I watch… the more I know.. how much I do not know.
Thanks for videos. They are extremely fun. -
Hi Derek…thank you for getting me past the OOP hump (classes v attributes v instances v methods). Is it possible for you to include your code in its entirety in the description or provide one complete screenview at the end of the video? I had to go back and forth to see all the bits. Thanks again!
-
am using python 2.7 for my thesis and cantera so am finding this quite useful
-
Why do you type return after every method? I don't really understand that part… Btw. Your tutorials are the best on youtube 🙂
-
GREAT TUTORIAL. Thanks for the time you invested. This is better than the 7 week course i just completed.
-
best tutorial series in youtube
-
why do some functions (methods :D) have the '__' around them? (eg _init_ and _name_ from vid 6)
-
Hey +Derek Banas , thanks for this playlist. Really cool. I am experienced programmer starting with Python. What is the point of the return statement in the set function when it does not return anything? (like a void in other languages)
-
But Python does not really have true encapsulations as you described. Attribute __owner can still be accessed by calling _className_attributeName. e.g.:
class Test:
__x = 10
a = Test
print a._Test__xPython does not really care at the privacy of a variable in the Java (Java is based on the security model) sense. It is more like, well, you see the variable is with double underscore, so if you are sensible enough just don't touch it.
-
Have you found out what school was it?
-
I got a question. When you're making a class, should you type your code from bottom up concept or top bottom concept?
And awesome video 😀 -
thanks a lot Derek!!! Your videos are awesome!!!!
-
Yes you are correct
-
"self" pretty much equals to "this" in java
-
Sorry, but I'm not allowed to provide my videos for direct download from YouTube. The reason is complicated. I'd do it if I could, but I just can't. Sorry about that.
-
Is there any way that we can get your videos to get for offline viewing ??
Leave a Reply