Skip to content

Commit e623f20

Browse files
committed
Add default for Interpolation.expression of ""
1 parent b6b99bf commit e623f20

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

Objects/clinic/interpolationobject.c.h

Lines changed: 14 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Objects/interpolationobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef struct {
5454
Interpolation.__new__ as interpolation_new
5555
5656
value: object
57-
expression: object(subclass_of='&PyUnicode_Type')
57+
expression: object(subclass_of='&PyUnicode_Type', c_default='&_Py_STR(empty)') = ""
5858
conversion: object(converter='_conversion_converter') = None
5959
format_spec: object(subclass_of='&PyUnicode_Type', c_default='&_Py_STR(empty)') = ""
6060
[clinic start generated code]*/
@@ -63,7 +63,7 @@ static PyObject *
6363
interpolation_new_impl(PyTypeObject *type, PyObject *value,
6464
PyObject *expression, PyObject *conversion,
6565
PyObject *format_spec)
66-
/*[clinic end generated code: output=6488e288765bc1a9 input=d91711024068528c]*/
66+
/*[clinic end generated code: output=6488e288765bc1a9 input=fc5c285c1dd23d36]*/
6767
{
6868
interpolationobject *self = PyObject_GC_New(interpolationobject, type);
6969
if (!self) {

0 commit comments

Comments
 (0)