April 2017
Beginner to intermediate
312 pages
7h 23m
English
In the object oriented example, you might have noticed a sentence enclosed in triple double quotes:
"""A Python class to store student information"""
This is called a doc string. The doc string is used to document information about a class or a method. Doc strings are especially helpful while trying to store information related to the usage of a method or a class (this will be demonstrated later in this chapter). Doc strings are also used at the beginning of a file to store multi-line comments related to an application or a code sample. Doc strings are ignored by the Python interpreter and they are meant to provide documentation about a class to fellow programmers.
Similarly, the Python interpreter ignores any single ...
Read now
Unlock full access