Completed
Let's get fancier
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
Understanding Attributes - They're Not Nearly as Boring as You Think
Automatically move to the next video in the Classroom when playback concludes
- 1 Intro
- 2 I teach Python!
- 3 Let's assign to a variable!
- 4 Let's get fancier
- 5 Variables vs. attributes
- 6 Reading from attributes
- 7 Setting attributes
- 8 We set attributes all the time
- 9 What's missing from this program?
- 10 Idea: A global variable
- 11 A better alternative
- 12 This is pretty ugly
- 13 What will this code print?
- 14 The answer
- 15 Methods are class attributes
- 16 Classes are file-less modules
- 17 Class attribute, nicer edition
- 18 Static variables.!?
- 19 Let's walk through this
- 20 A new version of Person
- 21 We need a new class
- 22 Does it work?
- 23 Try again, but with inheritance
- 24 Let's use inheritance
- 25 Better use of inheritance
- 26 The problem?
- 27 Solution: Explicitly call Person.init
- 28 Better: Use super
- 29 Printing our objects
- 30 Operator overloading
- 31 Something is still missing
- 32 Example
- 33 Use it in a class attribute
- 34 Retrieve the value
- 35 What are gets parameters?
- 36 Methods are descriptors
- 37 Where is our original function?