We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a280191 commit d20f6c1Copy full SHA for d20f6c1
conversions/octal_to_decimal.py
@@ -9,10 +9,16 @@ def oct_to_decimal(oct_string: str) -> int:
9
>>> oct_to_decimal("-45")
10
-37
11
>>> oct_to_decimal("2-0Fm")
12
+ Traceback (most recent call last):
13
+ ...
14
ValueError: Non-octal value was passed to the function
15
>>> oct_to_decimal("")
- ValueError: Empty string value was passed to the function
16
17
18
+ ValueError: Empty string was passed to the function
19
>>> oct_to_decimal("19")
20
21
22
23
"""
24
oct_string = str(oct_string).strip()
0 commit comments