Skip to content

Conversation

@rmonnet
Copy link
Contributor

@rmonnet rmonnet commented Nov 26, 2025

I started with the Go track and they had more tests than required so I went ahead and implemented these.

There were also exception raised for pop() and shift() on empty list but no tests for that (in problem-description as well as in the Go track) so I added these too.

I started with the Go track and they had more tests than
required so I went ahead and implemented these.

There were also exception raised for `pop()` and `shift()`
on empty list but no tests for that (in problem-description
as well as in the Go track) so I added these too.
@rmonnet rmonnet requested a review from glennj November 26, 2025 04:32
Based on the title, I misinterpreted the tests ending in
`_reassigns_head` and `_reassigns_tail`.
I got it straight after a discussion in the forum
(doesnt-understand-the-following-tests/20050).
Comment on lines +13 to +14
Cannot_Shift_empty_List,
Cannot_Pop_Empty_List,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need separate errors for these operations?

Suggested change
Cannot_Shift_empty_List,
Cannot_Pop_Empty_List,
Empty_List,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion. Will do.

@rmonnet rmonnet mentioned this pull request Nov 27, 2025
@rmonnet
Copy link
Contributor Author

rmonnet commented Nov 27, 2025

I corrupted my local copy somehow. Resubmitted as #90 with suggested changes of merging errors into a single Empty_List error.

@rmonnet rmonnet closed this Nov 27, 2025
rmonnet added a commit that referenced this pull request Nov 27, 2025
Replacement for PR #87.

* Implemented the Linked List exercise

I started with the Go track and they had more tests than
required so I went ahead and implemented these.

There were also exception raised for `pop()` and `shift()`
on empty list but no tests for that (in problem-description
as well as in the Go track) so I added these too.

* Fix two exercises that I misunderstood

Based on the title, I misinterpreted the tests ending in
`_reassigns_head` and `_reassigns_tail`.
I got it straight after a discussion in the forum
(doesnt-understand-the-following-tests/20050).

* SImplify error handling

Replaced multiple errors with a simpler Empty_List one.
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