Cheating Try Except
Project description
About
def try_except(t: func, ex: Exception = None):
try:
result = t()
return result
except Exception as e:
if isinstance(e,ex):
return e
elif ex is None:
return None
else:
return False
^^^ This is literally all the code
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
try_except-0.0.7.tar.gz
(2.3 kB
view hashes)