Mercurial > cpython-lru_cache-weakref
comparison Python/future.c @ 36726:bbf16fd024df legacy-trunk
from __future__ import with_statement addon for 'with', mostly written by
Neal.
| author | Thomas Wouters <thomas@python.org> |
|---|---|
| date | Tue, 28 Feb 2006 19:02:24 +0000 |
| parents | 5c36c222e7ca |
| children | cea54c9d921d 49c6eb688906 |
comparison
equal
deleted
inserted
replaced
| 36725:99066bea17f8 | 36726:bbf16fd024df |
|---|---|
| 29 continue; | 29 continue; |
| 30 } else if (strcmp(feature, FUTURE_DIVISION) == 0) { | 30 } else if (strcmp(feature, FUTURE_DIVISION) == 0) { |
| 31 ff->ff_features |= CO_FUTURE_DIVISION; | 31 ff->ff_features |= CO_FUTURE_DIVISION; |
| 32 } else if (strcmp(feature, FUTURE_ABSIMPORT) == 0) { | 32 } else if (strcmp(feature, FUTURE_ABSIMPORT) == 0) { |
| 33 ff->ff_features |= CO_FUTURE_ABSIMPORT; | 33 ff->ff_features |= CO_FUTURE_ABSIMPORT; |
| 34 } else if (strcmp(feature, FUTURE_WITH_STATEMENT) == 0) { | |
| 35 ff->ff_features |= CO_FUTURE_WITH_STATEMENT; | |
| 34 } else if (strcmp(feature, "braces") == 0) { | 36 } else if (strcmp(feature, "braces") == 0) { |
| 35 PyErr_SetString(PyExc_SyntaxError, | 37 PyErr_SetString(PyExc_SyntaxError, |
| 36 "not a chance"); | 38 "not a chance"); |
| 37 PyErr_SyntaxLocation(filename, s->lineno); | 39 PyErr_SyntaxLocation(filename, s->lineno); |
| 38 return 0; | 40 return 0; |
