Real sangria

Your IP: Click to reveal 46. Should a Line Break Before or After a Real sangria Operator? Introduction This document gives coding conventions for the Python code comprising the standard library in the main Python distribution.

Please see the companion informational PEP describing style guidelines for the C code in the C implementation of Python. Guido’s original Python Style Guide essay, with some additions from Barry’s style guide . This style guide evolves over time as additional conventions are identified and past conventions are rendered obsolete by changes in the language itself. Many projects have their own coding style guidelines. In the event of any conflicts, such project-specific guides take precedence for that project. A Foolish Consistency is the Hobgoblin of Little Minds One of Guido’s key insights is that code is read much more often than it is written.

The guidelines provided here are intended to improve the readability of code and make it consistent across the wide spectrum of Python code. A style guide is about consistency. Consistency with this style guide is important. Consistency within a project is more important. Consistency within one module or function is the most important. When in doubt, use your best judgment.

Look at other examples and decide what looks best. In particular: do not break backwards compatibility just to comply with this PEP! When applying the guideline would make the code less readable, even for someone who is used to reading code that follows this PEP. Because the code in question predates the introduction of the guideline and there is no other reason to be modifying that code. When the code needs to remain compatible with older versions of Python that don’t support the feature recommended by the style guide. Continuation lines should align wrapped elements either vertically using Python’s implicit line joining inside parentheses, brackets and braces, or using a hanging indent .

CATEGORIES
TAGS
Share This
NEWER POST
OLDER POST