| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 58b0bf5 commit a604dc8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,16 @@ | |||
| 1 | + # Copyright 2019 The go-python Authors. All rights reserved. | ||
| 2 | + # Use of this source code is governed by a BSD-style | ||
| 3 | + # license that can be found in the LICENSE file. | ||
| 4 | + | ||
| 5 | + doc="slice" | ||
| 6 | + a = slice(10) | ||
| 7 | + assert a.start == None | ||
| 8 | + assert a.stop == 10 | ||
| 9 | + assert a.step == None | ||
| 10 | + | ||
| 11 | + a = slice(0, 10, 1) | ||
| 12 | + assert a.start == 0 | ||
| 13 | + assert a.stop == 10 | ||
| 14 | + assert a.step == 1 | ||
| 15 | + | ||
| 16 | + doc="finished" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments