8000 octal_to_decimal converter by mohammadreza490 · Pull Request #2399 · TheAlgorithms/Python · GitHub
[go: up one dir, main page]

Skip to content

octal_to_decimal converter #2399

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

Merged
merged 3 commits into from
Sep 10, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update conversions/octal_to_decimal
Co-authored-by: Christian Clauss <cclauss@me.com>
  • Loading branch information
mohammadreza490 and cclauss authored Sep 6, 2020
commit bf0327e679713a7c75733b5c22892d57db5e7b77
2 changes: 1 addition & 1 deletion conversions/octal_to_decimal
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def oct_to_decimal(oct_string: str) -> int:
>>> oct_to_decimal("19")
ValueError: Non-octal value was passed to the function
"""
oct_string = oct_string.strip()
oct_string = str(oct_string).strip()
if not oct_string:
raise ValueError("Empty string was passed to the function")
is_negative = oct_string[0] == "-"
Expand Down
0