Commit Graph

157 Commits

Author SHA1 Message Date
CAESIUS_TIM 5db5213b9f
PEP 8: Clarify variable name in slice (#3128) 2023-04-30 07:23:54 -07:00
Erlend E. Aasland 6d182da522
PEP 8: Allow both one and two spaces after period (#3027)
Authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-02-25 04:44:10 -08:00
jbritton6 46efeee6d5
PEP 8: Fix typos (#2600) 2022-05-11 11:45:05 -06:00
Boris Gorelik 8306a794bc
PEP 8: Replaced outdated usages of `print` as a statement (#2271) 2022-01-25 07:20:55 -08:00
Adam Turner 113e490701
Several PEPs: Use explicit `:pep:` and `:rfc:` roles (#2209) 2022-01-21 11:03:51 +00:00
Éric c5f4d78b56
PEP 8: update text about backlash (#2244) 2022-01-16 21:44:11 -08:00
Christopher H.Barker, PhD 434a032b34
PEP 8: Removed references to Python 2 (#2059)
Also rewrite implicit mentions of Python 2 (e.g. "new-style classes").
2021-09-01 15:44:36 -07:00
Veronica Berglyd Olsen 76b7cbd1a6
PEP 8: Fix indentation of two paragraphs in list (#2041) 2021-07-22 07:18:38 -07:00
Marti Raudsepp 9b64c6ea75
Various typo/grammar/style fixes (#1789)
Changes detected by Topy (https://github.com/intgr/topy), all changes
verified by hand, false positives have been omitted.

These range from straight-out misspellings to debatable hyphen placement.
The hyphen changes are supported by grammar manuals of style.
2021-02-03 06:06:23 -08:00
Kyle Stanley 0511666bde
PEP 8: Add one line docstring example (#1670) 2020-10-21 19:20:02 -07:00
wyz23x2 5b81f54bd3
Update pep-0008.txt (#1522) 2020-07-11 07:39:44 -07:00
Keara Berlin 0c6427dcec
PEP 8: Change requirement to adhere to Standard English (#1470)
Instead of requiring that comments be written in Strunk & White Standard English, require instead that English-language comments be clear and easily understandable by other English speakers. This accomplishes the same goal without upholding relics of white supremacy. Many native English speakers do not use Standard English as their native dialect, so requiring conformation to Standard English centers whiteness in an inappropriate and unnecessary way, and can alienate and put up barriers for people of color and those whose native dialect of English is not Standard English. This change is a simple way to correct that while maintaining the original intent of the requirement.
2020-06-26 15:15:32 -07:00
Hanif Birgani 7eaf5f6303
PEP 8: Replace Yes/No with Correct/Wrong and unify formatting (#1342) 2020-04-01 09:34:28 -07:00
Shayaan Syed Ali f5ce32302f Fix in Pet Peeves example for consistency (#1208) 2019-10-18 09:30:07 +02:00
Damien George 2ce88849fd PEP 8: Discourage use of return/break/continue in finally (#1174) 2019-09-23 07:14:57 -07:00
Mariatta 2f8f1ec0ba PEP 8: minor grammar improvement (#926)
From 
> does not import objects whose name starts with an underscore.
into
> does not import objects whose names start with an underscore.

Closes https://github.com/python/pythondotorg/issues/1387
2019-03-13 10:48:04 -07:00
Andre Delfino 7b72f683be Update pep-0008.txt (#854) 2019-02-23 15:00:16 -08:00
Andrew Stepin b487e29f03 PEP 8: Comment clarification (#861) 2019-01-09 11:02:41 -08:00
Mark Amery acda0d1dde PEP 0008: Clarify self-contradictory =-spacing rules (#820)
Previously, the PEP contained roughly the following three rules, in sequence:

1. Never use spaces around `=` when used to indicate a parameter default
2. Something unrelated
3. DO use spaces around `=` when used to indicate a parameter default if there is also a parameter annotation present

This commit attempts to clarify this part of the PEP by:
* Combining the first and third rules listed above into a single rule that addresses both annotated and unannotated parameters
* Rephrasing the first rule to indicate that it applies only to unannotated parameters, to eliminate the logical contradiction
2018-10-29 10:52:27 -07:00
Géry Ogam 3714aa1cef PEP 8: Fix inconsistent use of line breaks, case and indentation (#664) 2018-07-07 16:20:37 -07:00
Géry Ogam 108b2f9da2 Use consistent "backwards" adverb and case for heads (#637) 2018-05-24 11:53:55 -07:00
Ivan Levkivskyi a81f56f751 Add coding style recommendations for variable annotations (#548) 2018-01-18 19:33:13 -08:00
Carl-Ty e0436e9f3c PEP 8 Explicitly State Variable Names convention? #535 (#545) 2018-01-17 15:56:23 -08:00
James Ray 07b66af4f3 abbreviation -> acronym (#517) 2017-12-19 13:05:09 -08:00
Mariatta cf3bad5ab3
Revert "Rename all .txt PEP files to .rst (GH-462)" (GH-464)
This reverts commit bb0e518ed3.
2017-11-11 11:28:55 -08:00
Huang Huang bb0e518ed3 Rename all .txt PEP files to .rst (GH-462)
For https://github.com/python/peps/issues/1
2017-11-11 10:30:43 -08:00
Mariatta 2c212e0086
PEP 8, deindent some of the text. (GH-458) 2017-11-10 09:22:07 -08:00
toonarmycaptain ef1eb2f868 Update pep-0008.txt (#438)
* Update pep-0008.txt

Clarified contradictions regarding comment formatting. NB Complete sentences should have a period.

* Update pep-0008.txt

Changed to remove reference to short comments without terminating period.

* Update pep-0008.txt

Further refined, corrected incorrect, fixed  singular/plural.

* Update pep-0008.txt

* Update pep-0008.txt

Edit for consistency use 'multi-' in 'multi-line` 'multi-statement` 'multi-sentence` etc with dash rather than space or no splitter (eg 'multi line`, 'multiline`). If a different convention is preferred, do that.

* Update pep-0008.txt 'latin' capitalization

'Latin' is a proper noun, and thus should be capitalized.

* Update pep-0008.txt 'boolean' capitalization

Capitalization should be consisted. I propose 'boolean' should always be capitalized, as per https://english.stackexchange.com/questions/4481/should-the-word-boolean-be-capitalized

At present it is inconsistently capitalised.
Changed 'boolean' to 'Boolean'

* Update pep-0008.txt - 'unicode' capitalization

Update pep-0008.txt - as a proper noun, 'unicode' should be capitalized. Fixed 3 instances.

* Revise Update pep-0008.txt

Removed revisions to 'boolean', 'unicode'. 

Unicode capitalization [issue](https://bugs.python.org/issue31873) under discussion.

* Removed trailing newlines

Removed trailing newlines

* Standardised 'multiline', reworded 'Latin'

Made the form 'multiline' uniform throughout the document. 

Clarified references to Latin alphabet to direct to the specific character set desired.

* Removed errant period

* Moved  'alphabet'

Moved  'alphabet' before encoding parenthesis line 336.
2017-11-05 16:52:16 -08:00
toonarmycaptain baef778005 Update pep-0008.txt (#433)
Update pep-0008.txt

Clarified contradictions regarding comment formatting. NB Complete sentences should have a period.
2017-10-25 11:28:55 -04:00
Joshua Dong b61bb7d343 fix minor typos (#294) 2017-07-12 11:58:51 -07:00
Nick Coghlan 8350530c12 Cross-reference PEP 3131 from PEP 8 (#286)
PEP 3131 (Unicode identifiers) includes a policy section
covering their use within the standard library.

This adds an explicit cross-reference to that section from
the prescriptive naming conventions section of PEP 8.
2017-06-06 12:57:48 +10:00
Guido van Rossum c78ccb3dcb Clarify my preferences around trailing commas (#211) 2017-02-13 21:50:40 -08:00
Ivan Levkivskyi a919235364 [WIP] Semantics of variance in type variables and notation conventions (#68)
* Semantics of variance in type variables and notation conventions

* Notation convention for type variables in PEP 8
2016-08-03 11:33:00 -07:00
Marti Raudsepp 04a6af2ab1 Fix various typos, spelling and grammar errors
Errors detected using Topy (https://github.com/intgr/topy), all changes
verified by hand.
2016-07-11 18:35:35 +03:00
Łukasz Langa b8a510bf29 Clarify backward-compatible type annotations
Previous wording used the term "function annotations" which is overly generic. This commit modifies the wording to make it clear we don't mean arbitrary function annotations.
2016-06-20 13:23:55 -07:00
Barry Warsaw 070a23b4a0 Clarify dunders. 2016-06-08 10:43:53 -04:00
Barry Warsaw 0aa70aebf1 Relax __all__ location.
Put all module level dunders together in the same location, and remove
the redundant version bookkeeping information.

Closes #27187.  Patch by Ian Lee.
2016-06-07 16:25:19 -04:00
Berker Peksag efcd31a52f Issue #27191: Improve markup of PEP 8, patch by Ian Lee 2016-06-02 19:13:50 -07:00
Serhiy Storchaka 4088a7dddc Backed out changeset: c4aef26d128b
Unknown interpreted text role "kbd".
2016-05-03 14:10:04 +03:00
Serhiy Storchaka 65c6f592cd Use the kbd role. 2016-05-03 10:47:48 +03:00
Senthil Kumaran 7690a00d47 PEP-8 Update on Knuth style breaking of a long formula. #issue26780
Patch by Brandon Rhodes provides clarity and rationale for this suggestion.
Also fixes the example to use "+", "-" operators which have same precedence
level.

Reviewed by Guido van Rossum.
2016-04-19 23:14:50 -07:00
Chris Angelico 2caed0265e Fix typo, resea[r]ch 2016-04-16 05:23:30 +10:00
Guido van Rossum 21bdcd2e9b Fix typo. Revert my previous diff that removed another example breaking before "and". 2016-04-15 09:54:42 -07:00
Guido van Rossum c59c4376ad According to Knuth, it is better to break *before* a binary operator. 2016-04-15 09:43:52 -07:00
Guido van Rossum 1a6cc45d06 Fix style inconsistency with "and" on continuation line. 2016-04-14 10:21:55 -07:00
Guido van Rossum e1d8f55b86 Just refer to the spec in PEP 484 for straddling annotations instead of repeating the info in PEP 8. 2016-03-21 13:30:24 -07:00
Barry Warsaw 254ad75c22 Gramatical and other improvements given by thefourtheye.
Closes #26408
2016-02-22 09:05:45 -05:00
Guido van Rossum 2d2ea7a703 Clarify that stdlib experiments with annotations are not encouraged. 2016-01-05 15:25:40 -08:00
Ethan Furman 544e54168a fix grammar 2016-01-05 12:12:27 -08:00
Guido van Rossum 146574f68a Update rules for function annotations in the light of PEP 484. 2016-01-05 10:33:30 -08:00