April 2017
Beginner to intermediate
312 pages
7h 23m
English
There are tools to verify PEP8 standards of your code. After writing a code sample, ensure that your code adheres to PEP8 standards. This can be done using the pep8 package. It can be installed as follows:
pip3 install pep8
Let's check whether one of our code samples has been written according to the PEP8 convention. This can be done as follows:
pep8 opencv_test.py
The check indicated the following errors:
opencv_test.py:5:50: E231 missing whitespace after ',' opencv_test.py:6:19: E231 missing whitespace after ','
As the output indicates, the following lines are missing a whitespace after a comma on lines 5 and 6:
Let's fix the problem, and our code should adhere ...
Read now
Unlock full access