mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Get rid of __context__, per the latest changes to PEP 343 and python-dev
discussion. There are two places of documentation that still mention __context__: Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without spending a whole lot of time thinking about it; and whatsnew, which Andrew usually likes to change himself.
This commit is contained in:
parent
8f6cbe1502
commit
da5b701aee
15 changed files with 27 additions and 202 deletions
|
|
@ -1706,9 +1706,6 @@ PyDoc_STRVAR(close_doc,
|
|||
PyDoc_STRVAR(isatty_doc,
|
||||
"isatty() -> true or false. True if the file is connected to a tty device.");
|
||||
|
||||
PyDoc_STRVAR(context_doc,
|
||||
"__context__() -> self.");
|
||||
|
||||
PyDoc_STRVAR(enter_doc,
|
||||
"__enter__() -> self.");
|
||||
|
||||
|
|
@ -1729,7 +1726,6 @@ static PyMethodDef file_methods[] = {
|
|||
{"flush", (PyCFunction)file_flush, METH_NOARGS, flush_doc},
|
||||
{"close", (PyCFunction)file_close, METH_NOARGS, close_doc},
|
||||
{"isatty", (PyCFunction)file_isatty, METH_NOARGS, isatty_doc},
|
||||
{"__context__", (PyCFunction)file_self, METH_NOARGS, context_doc},
|
||||
{"__enter__", (PyCFunction)file_self, METH_NOARGS, enter_doc},
|
||||
{"__exit__", (PyCFunction)file_close, METH_VARARGS, close_doc},
|
||||
{NULL, NULL} /* sentinel */
|
||||
|
|
@ -2445,4 +2441,3 @@ Py_UniversalNewlineFread(char *buf, size_t n,
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue