Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces is slice operator #172

Open
kotofos opened this issue Jul 17, 2015 · 2 comments
Open

Spaces is slice operator #172

kotofos opened this issue Jul 17, 2015 · 2 comments
Labels

Comments

@kotofos
Copy link

kotofos commented Jul 17, 2015

Isn't this code from readme contradict pip8 about spaces around the slice operator?
def f(a):
return 37 + -+a[42 - x:y ** 3]

exactly:
https://www.python.org/dev/peps/pep-0008/#pet-peeves Item 3:

No:
ham[lower + offset:upper + offset]

@bwendling
Copy link
Member

Yeah. I noticed this before. I super disagree with it, but it's not my PEP document. :-) There are a few formatting decisions that conflict here. But I think we can implement something that may help here...

@bwendling bwendling added the bug label Jul 27, 2015
@janhavi-naik14
Copy link

Spaces in the context of slicing can lead to confusion or readability issues but typically do not cause functional errors in Python. The key is to ensure that colons are used correctly and consistently in slice operations to avoid any syntax errors or misunderstandings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants