In comments How to write in PEP8 that you taught me. https://pep8-ja.readthedocs.io/ja/latest/#id16
For extended slices, you must have the same number of spaces on both sides.
I didn't know it was an extended slice.
https://docs.python.org/2.3/whatsnew/section-slices.html
However, Python's built-in list, tuple, and string sequence types have never supported this feature, raising a TypeError if you tried it.
Is the "extension" of the expansion slice an "extension" in the sense of "corresponding to list, tuple, string sequence"?
There are some examples of how to use it on the above page.
>>> L = range(10)
>>> L[::2]
[0, 2, 4, 6, 8]
>>> L[::-1]
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
https://pep8-ja.readthedocs.io/ja/latest/#id16 I understand (I think) about the following described in.
For extended slices, you must have the same number of spaces on both sides.
Recommended Posts