Skip to content
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

I doesn't work properly on lists #312

Closed
AMiller42 opened this issue Dec 1, 2021 · 3 comments · Fixed by #314
Closed

I doesn't work properly on lists #312

AMiller42 opened this issue Dec 1, 2021 · 3 comments · Fixed by #314
Labels
bug Something isn't working

Comments

@AMiller42
Copy link
Member

When splitting a list in half, the last half of the list is discarded and replaced with an empty list.

Example: Try it Online!

@razetime
Copy link
Collaborator

razetime commented Dec 2, 2021

This is the element definition: https://github.com/Vyxal/Vyxal/blob/main/vyxal/elements.py#L1643

But the problem doesn't seem to be with the function. It calls https://github.com/Vyxal/Vyxal/blob/main/vyxal/elements.py#L1415 and that's what is doing the slicing. We can temporarily fix this with simple slice notation, but index() which feeds into the i builtin will be the proper long term solution.

@lyxal
Copy link
Member

lyxal commented Dec 2, 2021

Btw this is a problem with LazyLists, not the indexing

@lyxal
Copy link
Member

lyxal commented Dec 2, 2021

lyxal added a commit that referenced this issue Dec 2, 2021
AMiller42 added a commit that referenced this issue Dec 2, 2021
fix #312 and add spaces to some list printing
@lyxal lyxal added bug Something isn't working vectorisation/generators bug labels Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants