mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
GH-77273: Better bytecodes for f-strings (GH-6132)
This commit is contained in:
parent
307bceaa65
commit
1d857da7f0
15 changed files with 525 additions and 485 deletions
|
@ -222,6 +222,14 @@ _PyEvalFramePushAndInit_Ex(PyThreadState *tstate, PyFunctionObject *func,
|
|||
static void
|
||||
_PyEvalFrameClearAndPop(PyThreadState *tstate, _PyInterpreterFrame *frame);
|
||||
|
||||
typedef PyObject *(*convertion_func_ptr)(PyObject *);
|
||||
|
||||
static const convertion_func_ptr CONVERSION_FUNCTIONS[4] = {
|
||||
[FVC_STR] = PyObject_Str,
|
||||
[FVC_REPR] = PyObject_Repr,
|
||||
[FVC_ASCII] = PyObject_ASCII
|
||||
};
|
||||
|
||||
#define UNBOUNDLOCAL_ERROR_MSG \
|
||||
"cannot access local variable '%s' where it is not associated with a value"
|
||||
#define UNBOUNDFREE_ERROR_MSG \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue