Function Dissection Lab - Learn How Functions Work

Function Dissection Lab - Learn How Functions Work

PyCon US via YouTube Direct link

The "global" declaration

21 of 25

21 of 25

The "global" declaration

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Function Dissection Lab - Learn How Functions Work

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Intro
  2. 2 I teach Python
  3. 3 Consider this code
  4. 4 Function objects? . When you use def. you create a function object.
  5. 5 Example
  6. 6 Error messages use this info
  7. 7 Additional variables
  8. 8 So, how does Python know?
  9. 9 Same goes for **kwargs
  10. 10 dis.show_code
  11. 11 Constants?
  12. 12 When Python calls a function...
  13. 13 Consider this function
  14. 14 Let's add a default
  15. 15 Keyword-only arguments
  16. 16 Where does Python put that?
  17. 17 Let's talk about scoping
  18. 18 How does Python know x isn't local?
  19. 19 Let's make things more complex
  20. 20 A more common version of this problem
  21. 21 The "global" declaration
  22. 22 Bytecodes with a local"X"
  23. 23 Putting the "E" in LEGB
  24. 24 What have we learned?
  25. 25 Questions or comments?

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.