Skip to content

Instantly share code, notes, and snippets.

@Tinche
Created January 12, 2022 11:20
Show Gist options
  • Save Tinche/32473ddca0912fd8463bab600fbbf698 to your computer and use it in GitHub Desktop.
Save Tinche/32473ddca0912fd8463bab600fbbf698 to your computer and use it in GitHub Desktop.
>>> from cattr import structure
>>> structure("a", int)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/tintvrtkovic/pg/incant/.venv/lib/python3.9/site-packages/cattr/converters.py", line 300, in structure
return self._structure_func.dispatch(cl)(obj, cl)
File "/Users/tintvrtkovic/pg/incant/.venv/lib/python3.9/site-packages/cattr/converters.py", line 404, in _structure_call
return cl(obj)
ValueError: invalid literal for int() with base 10: 'a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment