[Wordy] Add tuple-and-index approach#4202
Open
Yrahcaz7 wants to merge 3 commits into
Open
Conversation
also add "None" link and a few minor fixes
BethanyG
approved these changes
May 24, 2026
Member
BethanyG
left a comment
There was a problem hiding this comment.
Approving this - good work!!
The three things I found are more suggestion than "OMG change this". So you can decide if you agree or disagree. 😄
LMK if you'd like to let this sit, or have it merged. Thanks for doing this!!
| If there *is* an extra operator word, then we need to check if it is present as the next word in `words`. | ||
| If it is not present, we raise a `ValueError`, else we increment `operand_index` by `1` to get the correct index. | ||
|
|
||
| Here we call the helper function again, setting `operand` to the number at index `operand_index`, and raising a `ValueError` if it is not a number. |
Member
There was a problem hiding this comment.
You might want to name the helper function since this explanation is long enough to have to scroll back up to see the code.
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds another Wordy approach as discussed in this PR.
Also fixes a few errors in the Wordy approach docs that were missed in that PR.