Python's Class Development Toolkit
- External reference:
Python’s Class Development Toolkit - YouTube
time text 00:37:15.260 the purpose of the 00:37:17.600 double underscore is what we call a 00:37:19.310 class local reference we are making sure 00:37:21.980 that self actually refers to you most of 00:37:24.740 the time self means you or your children 00:37:26.300 but occasionally you need it to be you 00:37:28.130 people will mistakenly represent this is 00:37:30.380 the way to make things private in Python 00:37:32.060 spy thought about privacy now it’s a 00:37:34.460 consenting adult language we don’t leave 00:37:36.110 the locks on the door the intention of 00:37:38.750 the double underscores was not about 00:37:40.250 privacy the intention was to use it 00:37:42.710 exactly like this it’s actually the 00:37:44.870 opposite of privacy is all about freedom 00:37:47.000 it makes your subclasses free to 00:37:49.220 override any one method without breaking 00:37:51.200 the others