New submission from Raymond Hettinger <[email protected]>:
We already support sets but not empty sets. After the PR, this now works:
>>> from ast import literal_eval
>>> literal_eval('set()')
set()
If we wanted, it would be a simple matter to extend it frozensets:
>>> literal_eval('frozenset({10, 20, 30})')
frozenset({10, 20, 30})
----------
components: Library (Lib)
messages: 359007
nosy: rhettinger
priority: normal
severity: normal
status: open
title: ast.literal_eval() doesn't support empty sets
versions: Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39158>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com