Section 1 Review
This video concludes the section on Python functions and gives you a review of what has been covered up to this point. Here’s what you learned so far:
- Functions can return a value based on their given arguments
- Functions are first class objects and they can be accessed inside lists or dictionaries
- How do define functions inside of other functions
- How to call and return inner functions
Now that you understand how functions work in Python, you’re ready to learn more about decorators.
Free Bonus: Click here to get access to a free "The Power of Python Decorators" guide that shows you three advanced decorator patterns and techniques you can use to write cleaner and more Pythonic programs.
Decorators Cheat Sheet: Click here to get access to a free three-page Python decorators cheat sheet that summarizes the techniques explained in this tutorial.
00:00 Up to this point, we’ve been focusing on functions. You started out defining a function—talking about the header, the statement, and calling the function.
00:10 We discussed how a function returns a value based upon its given arguments.
00:18 Then, I showed you how functions are first-class objects. They can be accessed inside of a list or a dictionary.
00:27 That inside of Python, they have a lot of the same properties as other objects. Next, I showed you how you could define functions inside of functions, and how they can be called inside of that function themselves.
00:40 And the last thing that I covered with you was how you could return a function from within a function so that you can access them outside the local scope.
00:50 Congratulations. With all that background covered, you’re ready to talk about decorators.
Become a Member to join the conversation.