Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 41846:308e632702bf
Enable new I/O. Disable creation of old files.
Lots of stuff fails now, including -S and -m command line flags.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 24 May 2007 14:31:33 +0000 |
| parents | 24b60622b944 |
| children | aa73206c9ce6 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Thu May 24 04:05:35 2007 +0000 +++ b/Python/bltinmodule.c Thu May 24 14:31:33 2007 +0000 @@ -1434,18 +1434,6 @@ static PyObject * -builtin_open(PyObject *self, PyObject *args, PyObject *kwds) -{ - return PyObject_Call((PyObject*)&PyFile_Type, args, kwds); -} - -PyDoc_STRVAR(open_doc, -"open(name[, mode[, buffering]]) -> file object\n\ -\n\ -Open a file using the file() type, returns a file object."); - - -static PyObject * builtin_ord(PyObject *self, PyObject* obj) { long ord; @@ -1464,7 +1452,7 @@ ord = (long)*PyUnicode_AS_UNICODE(obj); return PyInt_FromLong(ord); } - } + } else if (PyBytes_Check(obj)) { /* XXX Hopefully this is temporary */ size = PyBytes_GET_SIZE(obj); @@ -1963,7 +1951,6 @@ {"min", (PyCFunction)builtin_min, METH_VARARGS | METH_KEYWORDS, min_doc}, {"next", (PyCFunction)builtin_next, METH_VARARGS, next_doc}, {"oct", builtin_oct, METH_O, oct_doc}, - {"open", (PyCFunction)builtin_open, METH_VARARGS | METH_KEYWORDS, open_doc}, {"ord", builtin_ord, METH_O, ord_doc}, {"pow", builtin_pow, METH_VARARGS, pow_doc}, {"print", (PyCFunction)builtin_print, METH_VARARGS | METH_KEYWORDS, print_doc},
