- [Instructor] Another similarity that Python has…with some other programming languages…is that it provides away for specifying…function parameters using keywords.…So for example, you can define a function…that takes positional arguments…along with keyword arguments…that take optional values like this.…Then, when you want to call the function,…you can specify values by position or by keyword.…In some cases however, you may want to require…the callers of your particular function…specify arguments using keywords only…in order to provide better readability of the code.…
So for example, suppose we have a function…that performs a critical operation.…And it provides an option to suppress exceptions.…So one way to write this function…would be to specify a regular argument…and have it default to a certain value.…Now the problem with this approach…is that the function can be invoked…just by passing a regular positional argument.…And since this parameter has a significant effect…on how the program runs, it might be better…
- Truth value testing
- Template strings
- Advanced Python functions
- Advanced collections
- Advanced classes and objects
- Python comprehensions: list, dictionary, and set
Skill Level Advanced
1. Python Language Features
2. Built-In Functions
3. Advanced Python Functions
4. Advanced Collections
5. Advanced Classes and Objects
6. Using Logging
7. Python Comprehensions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.