1 00:00:00,000 --> 00:00:09,000 In this video, you'll learn about PEP. 2 00:00:09,000 --> 00:00:11,560 PEP is the Python Enhancement Proposal. 3 00:00:11,560 --> 00:00:14,760 It contains guidelines and proposed improvements. 4 00:00:14,760 --> 00:00:19,520 PEP 8 is the current version, and it defines coding style to ensure consistency across 5 00:00:19,520 --> 00:00:20,520 projects. 6 00:00:20,520 --> 00:00:23,680 So, it's best practices for coding. 7 00:00:23,680 --> 00:00:26,379 And the Python core standard library follows it. 8 00:00:26,379 --> 00:00:28,920 And as a programmer, you should follow it as well. 9 00:00:28,920 --> 00:00:32,099 Here are some recommendations. 10 00:00:32,099 --> 00:00:35,900 One of the recommendations is about indentation and line length. 11 00:00:35,900 --> 00:00:42,380 So you should use four spaces for indentation, and a maximum line length is 79 characters. 12 00:00:42,380 --> 00:00:45,220 Then there are some naming conventions. 13 00:00:45,220 --> 00:00:49,020 Variables and functions are in lowercase, with underscores. 14 00:00:49,020 --> 00:00:54,180 As you can see noted here, lowercase underscore, with underscore, underscores. 15 00:00:54,180 --> 00:00:58,580 And classes use cap words, wherever the word starts with a capital. 16 00:00:58,580 --> 00:01:00,619 Functions are in uppercase. 17 00:01:00,619 --> 00:01:08,080 And there's also a recommendation about whitespaces after commas, and no spaces before parentheses. 18 00:01:08,080 --> 00:01:09,940 The import order is as following. 19 00:01:09,940 --> 00:01:14,739 First, there's a standard library, then there is the external packages, and then there is 20 00:01:14,739 --> 00:01:16,139 the local modules. 21 00:01:16,139 --> 00:01:20,180 And these are the most important recommendations in the PEP 8 standard.