diff options
author | Guido van Rossum <guido@python.org> | 2007-05-24 14:31:33 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-24 14:31:33 (GMT) |
commit | 6f376c40317e693c5eea0356fbb90d7394f21ff0 (patch) | |
tree | b787fddfb1173c1045d3c9e622b255754ab5eb49 /Python/bltinmodule.c | |
parent | fa0054aa732176a1f9b1c79cd20198f43cfed334 (diff) | |
download | cpython-6f376c40317e693c5eea0356fbb90d7394f21ff0.zip cpython-6f376c40317e693c5eea0356fbb90d7394f21ff0.tar.gz cpython-6f376c40317e693c5eea0356fbb90d7394f21ff0.tar.bz2 |
Enable new I/O. Disable creation of old files.
Lots of stuff fails now, including -S and -m command line flags.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 770023d..b292d16 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1434,18 +1434,6 @@ Return the octal representation of an integer or long integer."); 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 @@ builtin_ord(PyObject *self, PyObject* obj) 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 @@ static PyMethodDef builtin_methods[] = { {"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}, |