[Python-Dev] Suggested addition to PEP 8 for context managers (original) (raw)
Floris Bruynooghe flub at devork.be
Mon Apr 23 12:15:31 CEST 2012
- Previous message: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
- Next message: [Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[resent since I accidentally dropped the list]
Hi,
On 19 April 2012 15:55, Barry Warsaw <barry at python.org> wrote:
I'll make this change to the PEP. I'm not entirely sure the Yes/No examples are great illustrations of this change in wording though. Here's the diff so far (uncommitted):
diff -r 34076bfed420 pep-0008.txt --- a/pep-0008.txt Thu Apr 19 10:32:50 2012 +0200 +++ b/pep-0008.txt Thu Apr 19 10:53:15 2012 -0400 @@ -305,7 +305,11 @@
>=,in,not in,is,is not), Booleans (and,or,not). -- Use spaces around arithmetic operators: +- If operators with different priorities are used, consider adding + whitespace around the operators with the lowest priority(ies). This + is very much to taste; however, never use more than one space, and + always have the same amount of whitespace on both sides of a binary + operator.
While the text is certainly an improvement it seems to me that right now some of the examples following under the "No:" should be moved to "Yes:"
""" No: i=i+1 submitted +=1 x = x2 - 1 hypot2 = xx + y*y c = (a+b) * (a-b) """
In particular "x = x2 -1" and "hypot2 = xx + y*y" sound like they should be under "Yes".
Regards, Floris
-- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org
- Previous message: [Python-Dev] What do PyAPI_FUNC & PyAPI_DATA mean?
- Next message: [Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]