self.assertEqual(err.end_lineno, end_lineno)
if end_offset is not None:
self.assertEqual(err.end_offset, end_offset)
-
+
else:
self.fail("compile() did not raise SyntaxError")
self._check_error("int(**{'base': 10}, *['2'])",
"iterable argument unpacking follows "
"keyword argument unpacking")
-
+
def test_generator_in_function_call(self):
self._check_error("foo(x, y for y in range(3) for z in range(2) if z , p)",
"Generator expression must be parenthesized",
c"""', """\
STRING 'rb"\""a\\\\\\nb\\\\\\nc"\""' (1, 0) (3, 4)
""")
-
+
self.check_tokenize('f"abc"', """\
STRING 'f"abc"' (1, 0) (1, 6)
""")
}
Py_XDECREF(tmp_item);
tmp_item = PySequence_GetItem(winsz, 1);
- winsz_1 = PyLong_AsLong(tmp_item);
+ winsz_1 = PyLong_AsLong(tmp_item);
if (winsz_1 == -1 && PyErr_Occurred()) {
Py_XDECREF(tmp_item);
return NULL;
};
static PyModuleDef_Slot tokenizemodule_slots[] = {
- {Py_mod_exec, tokenizemodule_exec},
+ {Py_mod_exec, tokenizemodule_exec},
{0, NULL}
};
switch (Py_SIZE(item)) {
case -1: b = -(sdigit) ((PyLongObject*)item)->ob_digit[0]; break;
// Note: the continue goes to the top of the "while" loop that iterates over the elements
- case 0: Py_DECREF(item); continue;
+ case 0: Py_DECREF(item); continue;
case 1: b = ((PyLongObject*)item)->ob_digit[0]; break;
default: b = PyLong_AsLongAndOverflow(item, &overflow); break;
}