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

Update list.py #28

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open

Conversation

John-J-Riehl
Copy link

Found an error when slicing a ListMonad.

my_list = ListMonad(1)
print(my_list[:-1]) # should be [], actually raises UnboundLocalError on line 84 in list.py

I believe the change I made will fix this.

Found an error when slicing a ListMonad.

    my_list = ListMonad(1)
    print(my_list[:-1]) # should be [], actually raises UnboundLocalError on line 84 in list.py

I believe the change I made will fix this.
Copy link

@maestro-1 maestro-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually pretty accurate and I think it is a fix that should get merged. Although removing the else and just returning outside the if block is more aesthetically pleasing to look at @John-J-Riehl

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.

2 participants