-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
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
Added doctests, exceptions, type hints, fixed bug, remove trailing whitespace for infix_to_prefix_conversion #10063
Conversation
@@ -15,7 +15,7 @@ | |||
""" | |||
|
|||
|
|||
def infix_2_postfix(infix): | |||
def infix_2_postfix(infix: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BEFORE we modify this function we need it to have doctests. You can do that in a separate pull request and then we can circle back to this pull request AFTER the doctests have been merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged one of them that adds tests. The other one deletes the work of others but perhaps it is the right thing to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok thanks i'll work on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase to fix to resolve the git conflict. If you are unsure how to do that, please close this pull request and then create a new one. |
Describe your change:
Fixes #9943
File affected: data_structures/stacks/infix_to_prefix_conversion.py
and stack[-1] != "("
Checklist: