Understanding Attributes - They're Not Nearly as Boring as You Think

Understanding Attributes - They're Not Nearly as Boring as You Think

PyCon US via YouTube Direct link

Intro

1 of 37

1 of 37

Intro

Class Central Classrooms beta

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

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.