Cloned DMOJ
This commit is contained in:
parent
f623974b58
commit
49dc9ff10c
513 changed files with 132349 additions and 39 deletions
12
judge/utils/strings.py
Normal file
12
judge/utils/strings.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
def safe_int_or_none(value):
|
||||
try:
|
||||
return int(value)
|
||||
except (ValueError, TypeError):
|
||||
return None
|
||||
|
||||
|
||||
def safe_float_or_none(value):
|
||||
try:
|
||||
return float(value)
|
||||
except (ValueError, TypeError):
|
||||
return None
|
Loading…
Add table
Add a link
Reference in a new issue