From the course: Advanced Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Python coding style

Python coding style - Python Tutorial

From the course: Advanced Python

Start my 1-month free trial

Python coding style

- [Instructor] Once you've been programming for some length of time, you quickly come to the realization that code gets read a lot more often than it gets written. In other words, developers spend a significant amount of time working on code that has already been written, either by themselves or by someone else. By adhering to a consistent programming style, you can make your job, as well as the jobs of your colleagues, a lot easier. The Python Foundation has a series of Python Enhancement Proposals, or PEPs, which you can find on the Python.org site in the Developer Guide. We're going to take a look at some of the guidelines specified by PEP eight, which is the Style Guide for Python Code and can be found at this link. Now, obviously, following this guide is not required. You can write your Python code however you want, as long as it has valid syntax. But by following this guide, you'll make your code a lot easier to maintain and update down the road, even if it's by you. If you open…

Contents