UrbanPro
true

Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

PEP (Python Enhancement Proposals)

Sudheer S
06/10/2016 0 0

Python Enhancement Proposals(PEP) are suggestions for improvements to the language, made by experienced Python developers. PEP 8 is a style guide on the subject of writing readable code. It contains a number of guidelines in reference to variable names, which are summarized here:

1. Modules should have short, all lowercase names. ex: arithops

2. Class names should be in TitleCase. ex: AnimalGeneric

3. Constants ( variables that never change value ) should be in UPPERCASE. ex: PI

4. Names that would clash with Python keywords ( such as 'class' or 'if') should have a trailing underscore. ex: _class, _if

5. Use double underscore before class data members to make encapsulation possible.

PEP8 also recommends using spaces around operators and after commas to increase readability.

The above PEP 8 style guide is very much useful for Python beginners to maintain consistency of variable names through out the project and helping in writing a readable code.

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You


Python Puzzle: Find The Checksum To Ensure Flawless Data Transfer
Find below the puzzle: sampleInput='''5195 753 2468''' The first item's(5195) largest and smallest values are 9 and 1, and their difference is 8. The second item's(753) largest and smallest values...

Python - Solving Ordinary Differential Equations - Predator Prey Model aka Lotka Volterra Equations
This is an assignment in Python, I contributed to a numerical Python MOOC from George Washington University. The link to this assignment on github is here. The Lotka–Volterra equations, also...
S

Sri Vallabha Deevi

0 0
1

Write your first Python program in 10 minutes
1. Download python from python official site search "python download" in google 2. Install in your machine 3. verify using : "python --version" command 4. Write first program using notepad create...

Python Programming
Python is a widely used general-purpose, high-level programming language. This is an Open Source Software and its source code is available with a license in which the Copyright holder provides the rights...
X

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more