New submission from Anthony Mayer:

After discussion about extraneous whitespace around colons in a list slice not 
being an error on the pep8 checker project (see 
https://github.com/jcrocholl/pep8/issues/321#issuecomment-53649841), ncoghlan 
suggested filing a ticket here to get the issue added to PEP8. The issue being 
that PEP8 doesn't say that

x = [1, 2, 3, 4]
x[1: 3]

is wrong. It should suggest doing

x = [1, 2, 3, 4]
x[1:3]

instead. This rule should probably be added to the "Whitespace In Expressions 
and Statements" section of PEP8 
(http://legacy.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements)

----------
assignee: docs@python
components: Documentation
messages: 226185
nosy: Guido.van.Rossum, anthonymayer, barry, docs@python, ncoghlan
priority: normal
severity: normal
status: open
title: Add rule about "extraneous whitespace around colon" to "Whitespace In 
Expressions and Statements" of PEP8

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22316>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to