Skip to content

JavascriptArray: support slice subscripts and negative indices#2724

Open
fgallaire wants to merge 1 commit into
brython-dev:masterfrom
fgallaire:jsarray-slice
Open

JavascriptArray: support slice subscripts and negative indices#2724
fgallaire wants to merge 1 commit into
brython-dev:masterfrom
fgallaire:jsarray-slice

Conversation

@fgallaire

Copy link
Copy Markdown
Contributor
>>> from browser import window
>>> arr = window.eval('["a","b","c","d"]')
>>> arr[1:3]
TypeError: 'slice' object cannot be interpreted as an integer  # before
>>> arr[1:3]
['b', 'c']                                                     # after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant