Skip to content

Commit

Permalink
Update p11_naming_slice.rst
Browse files Browse the repository at this point in the history
修改55行到66行的切片对象名,由原来的切片对象s改为a,便于和后面的部分连续起来理解。
  • Loading branch information
andyyoung01 committed Jan 19, 2016
1 parent 9264f04 commit 2e6d835
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/c01/p11_naming_slice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@
>>> items
[0, 1, 4, 5, 6]
如果你有一个切片对象s,你可以分别调用它的 ``s.start`` , ``s.stop`` , ``s.step`` 属性来获取更多的信息。比如:
如果你有一个切片对象a,你可以分别调用它的 ``a.start`` , ``a.stop`` , ``a.step`` 属性来获取更多的信息。比如:

.. code-block:: python
>>> s = slice(5, 50, 2)
>>> s.start
>>> a = slice(5, 50, 2)
>>> a.start
5
>>> s.stop
>>> a.stop
50
>>> s.step
>>> a.step
2
>>>
Expand Down

0 comments on commit 2e6d835

Please sign in to comment.