Skip to content

Implement slice object #98

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

Closed
HyeockJinKim opened this issue Sep 29, 2019 · 0 comments
Closed

Implement slice object #98

HyeockJinKim opened this issue Sep 29, 2019 · 0 comments

Comments

@HyeockJinKim
Copy link
Contributor

Currently the slice object is not fully implemented.
Many features, including instance creation, are not fully implemented and must be implemented.

// "slice": py.SliceType,

gpython/py/slice.go

Lines 16 to 18 in 8c361a8

var SliceType = NewType("slice", `slice(stop) -> slice object
"slice(stop)
slice(start, stop[, step])

Expected result (cpython)

>>> slice(10)
slice(None, 10, None)
>>> slice(10).indices(0)
(0, 0, 1)
HyeockJinKim added a commit to HyeockJinKim/gpython that referenced this issue Sep 29, 2019
HyeockJinKim added a commit to HyeockJinKim/gpython that referenced this issue Sep 29, 2019
corona10 pushed a commit that referenced this issue Sep 29, 2019
* Add __new__ function and property of slice

Issue #98

* Add tests for slice
@corona10 corona10 reopened this Sep 29, 2019
HyeockJinKim added a commit to HyeockJinKim/gpython that referenced this issue Sep 29, 2019
HyeockJinKim added a commit to HyeockJinKim/gpython that referenced this issue Sep 30, 2019
HyeockJinKim added a commit to HyeockJinKim/gpython that referenced this issue Oct 1, 2019
HyeockJinKim added a commit to HyeockJinKim/gpython that referenced this issue Oct 2, 2019
@ncw ncw closed this as completed in 33327c5 Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants