KiBot/experiments/exception/demo3.py
SET 1ba778f7f1 Added some exception experiments I did.
They are to verify a detail we discussed with @qu1ck about a patch
for IBoM. They aren't very interesting, but they are a playground
to test Python 2/3 exception details.
2020-08-19 11:47:09 -03:00

7 lines
216 B
Python

#!/usr/bin/python3
try:
raise Exception
except Exception as e:
s, r = getattr(e, 'message', str(e)), getattr(e, 'message', repr(e))
print('s:', s, 'len(s):', len(s))
print('r:', r, 'len(r):', len(r))