diff options
author | Campbell Barton <campbell@blender.org> | 2022-07-12 09:05:13 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-07-12 09:05:13 +0300 |
commit | 00c7e760b323e5fa46703d0e4769c8f1d9c35f2e (patch) | |
tree | 8e47cd0485eb69b5142561fc7ba61d4f2dcbdc5d /tests | |
parent | 2a1d12d7a0edd7ecffda3c5e1bf5c3b512976bbb (diff) |
Python: add opcodes for safe py-drivers
The following opcodes have been added, see [0] for details:
- LIST_TO_TUPLE: convert a list to a tuple,
use for constructing lists/tuples in some cases.
- LIST_EXTEND: use for constructing lists with unpacking.
- SET_UPDATE: use for constructing sets with unpacking.
- CONTAINS_OP: check if `a in b` generally useful.
When writing tests these op-codes where needed for basic operations
and can be safely supported.
Add note why dictionary manipulation op-codes have been left out.
Also restrict namsepace access to anything with an underscore prefix
since these may be undocumented.
[0]: https://docs.python.org/3.10/library/dis.html
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions