[Python-Dev] Suggested addition to PEP 8 for context managers (original) (raw)
Hrvoje Niksic hrvoje.niksic at avl.com
Wed Apr 18 09:31:51 CEST 2012
- Previous message: [Python-Dev] Suggested addition to PEP 8 for context managers
- Next message: [Python-Dev] Suggested addition to PEP 8 for context managers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 04/17/2012 04:21 PM, Guido van Rossum wrote:
I hope that's now what it says about slices -- that was meant for dict displays. For slices it should be symmetrical. In this case I would remove the spaces around the +, but it's okay to add spaces around the : too. It does look odd to have an operator that binds tighter (the +) surrounded by spaces while the operator that binds less tight (:) is not.
The same oddity occurs with expressions in kwargs calls:
func(pos1, pos2, keyword=foo + bar)
I find myself wanting to add parentheses arround the + to make the code clearer.
- Previous message: [Python-Dev] Suggested addition to PEP 8 for context managers
- Next message: [Python-Dev] Suggested addition to PEP 8 for context managers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]