Skip to content

Commit aab8fa4

Browse files
committed
Add tests for slice
1 parent ffcb977 commit aab8fa4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

py/tests/slice.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy