- [Instructor] It's always a good idea…to write documentation strings…for your functions, classes, and modules.…And personally, I think this is…one of the great features of Python.…The documentation for your program's code,…as well as Python's code, is directly available…as your program is being run or used by another developer.…So, let's take a look at an example.…Here in the terminal, I'm going…to fire up the Python interpreter…and then, I'm going to look at…the documentation for the map function,…which we learned about earlier in the course.…
So, to do that, all I have to do…is execute the command, print,…and then map, dot, underscore,…underscore, doc and then two underscores.…And there you can see the…documentation for the map function.…And as I mentioned, this works…for more than just functions.…It also works for classes and modules.…So, I'll import the collections module…that we'll be using later in the course.…And I'll take a look at the docstring for that module.…So, I'll print...…
Collections...…Dot, underscore, underscore, doc, underscore, underscore.…
- 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.