Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 42817:5355337709e1
Implementation of PEP 3101, Advanced String Formatting.
Known issues:
The string.Formatter class, as discussed in the PEP, is incomplete.
Error handling needs to conform to the PEP.
Need to fix this warning that I introduced in Python/formatter_unicode.c:
Objects/stringlib/unicodedefs.h:26: warning: `STRINGLIB_CMP' defined but not used
Need to make sure sign formatting is correct, more tests needed.
Need to remove '()' sign formatting, left over from an earlier version of the PEP.
| author | Eric Smith <eric@trueblade.com> |
|---|---|
| date | Sat, 25 Aug 2007 02:26:07 +0000 |
| parents | 872c7c3f0af3 |
| children | 6e7359106718 |
comparison
equal
deleted
inserted
replaced
| 42816:872c7c3f0af3 | 42817:5355337709e1 |
|---|---|
| 1 /* File automatically generated by Parser/asdl_c.py. */ | 1 /* File automatically generated by Parser/asdl_c.py. */ |
| 2 | 2 |
| 3 | 3 |
| 4 /* | 4 /* |
| 5 __version__ 56266. | 5 __version__ . |
| 6 | 6 |
| 7 This module must be committed separately after each AST grammar change; | 7 This module must be committed separately after each AST grammar change; |
| 8 The __version__ number is set to the revision number of the commit | 8 The __version__ number is set to the revision number of the commit |
| 9 containing the grammar change. | 9 containing the grammar change. |
| 10 */ | 10 */ |
| 3177 if (!m) return; | 3177 if (!m) return; |
| 3178 d = PyModule_GetDict(m); | 3178 d = PyModule_GetDict(m); |
| 3179 if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; | 3179 if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; |
| 3180 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) | 3180 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) |
| 3181 return; | 3181 return; |
| 3182 if (PyModule_AddStringConstant(m, "__version__", "56266") < 0) | 3182 if (PyModule_AddStringConstant(m, "__version__", "") < 0) |
| 3183 return; | 3183 return; |
| 3184 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; | 3184 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; |
| 3185 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) | 3185 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) |
| 3186 return; | 3186 return; |
| 3187 if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) | 3187 if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) |
