| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 19641c3 commit 35c7c68
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,7 +76,7 @@ def simple_eval(node_or_string, namespace=None): | |||
| 76 | 76 | ||
| 77 | 77 | The string or node provided may only consist of: | |
| 78 | 78 | * the following Python literal structures: strings, numbers, tuples, | |
| 79 | - lists, dicts, sets (Python 3.9+) | ||
| 79 | + lists, dicts, and sets | ||
| 80 | 80 | * variable names causing lookups in the passed in namespace or builtins | |
| 81 | 81 | * getitem calls using the [] syntax on objects of the types above | |
| 82 | 82 | ||
@@ -108,7 +108,7 @@ def _convert(node): | |||
| 108 | 108 | (_convert(k), _convert(v)) | |
| 109 | 109 | for k, v in zip(node.keys, node.values) | |
| 110 | 110 | ) | |
| 111 | - elif sys.version_info[:2] >= (3, 9) and isinstance(node, ast.Set): | ||
| 111 | + elif isinstance(node, ast.Set): | ||
| 112 | 112 | return set(map(_convert, node.elts)) | |
| 113 | 113 | ||
| 114 | 114 | # this is a deviation from literal_eval: we allow non-literals | |
| Back | FazBrowse Home | New Git URL |
0 commit comments