Skip to content

Add Python type hints and doctests to other/two_sum.py #2465

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

Closed
cclauss opened this issue Sep 23, 2020 · 1 comment · Fixed by #2467
Closed

Add Python type hints and doctests to other/two_sum.py #2465

cclauss opened this issue Sep 23, 2020 · 1 comment · Fixed by #2467

Comments

@cclauss
Copy link
Member

cclauss commented Sep 23, 2020

@tonydelanuez Would you be willing to add Python type hints and doctests to other/two_sum.py? The function comments say that it will return a list[int] but instead it either returns a list[list[int]] or False.

@spamegg1
Copy link
Contributor

I jumped at the opportunity, hope that's OK.

cclauss added a commit that referenced this issue Sep 23, 2020
* Add Python type hints and doctests to other/two_sum.py

#2465

* Update other/two_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/two_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update two_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>
stokhos pushed a commit to stokhos/Python that referenced this issue Jan 3, 2021
…#2467)

* Add Python type hints and doctests to other/two_sum.py

TheAlgorithms#2465

* Update other/two_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update other/two_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update two_sum.py

Co-authored-by: Christian Clauss <cclauss@me.com>
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 a pull request may close this issue.

2 participants