comparison Python/bltinmodule.c @ 16048:70bb1119044a legacy-trunk

Backed out the unistr() builtin.
author Marc-André Lemburg <mal@egenix.com>
date Fri, 19 Jan 2001 21:36:19 +0000
parents 7234d7c3c29f
children bf678a11c21a
comparison
equal deleted inserted replaced
16047:e50cfa5475f3 16048:70bb1119044a
1931 static char str_doc[] = 1931 static char str_doc[] =
1932 "str(object) -> string\n\ 1932 "str(object) -> string\n\
1933 \n\ 1933 \n\
1934 Return a nice string representation of the object.\n\ 1934 Return a nice string representation of the object.\n\
1935 If the argument is a string, the return value is the same object."; 1935 If the argument is a string, the return value is the same object.";
1936
1937
1938 static PyObject *
1939 builtin_unistr(PyObject *self, PyObject *args)
1940 {
1941 PyObject *v;
1942
1943 if (!PyArg_ParseTuple(args, "O:unistr", &v))
1944 return NULL;
1945 return PyObject_Unicode(v);
1946 }
1947
1948 static char unistr_doc[] =
1949 "unistr(object) -> unicode\n\
1950 \n\
1951 Return a nice unicode representation of the object.\n\
1952 If the argument is a unicode, the return value is the same object.";
1953 1936
1954 1937
1955 static PyObject * 1938 static PyObject *
1956 builtin_tuple(PyObject *self, PyObject *args) 1939 builtin_tuple(PyObject *self, PyObject *args)
1957 { 1940 {
2265 {"str", builtin_str, 1, str_doc}, 2248 {"str", builtin_str, 1, str_doc},
2266 {"tuple", builtin_tuple, 1, tuple_doc}, 2249 {"tuple", builtin_tuple, 1, tuple_doc},
2267 {"type", builtin_type, 1, type_doc}, 2250 {"type", builtin_type, 1, type_doc},
2268 {"unicode", builtin_unicode, 1, unicode_doc}, 2251 {"unicode", builtin_unicode, 1, unicode_doc},
2269 {"unichr", builtin_unichr, 1, unichr_doc}, 2252 {"unichr", builtin_unichr, 1, unichr_doc},
2270 {"unistr", builtin_unistr, 1, unistr_doc},
2271 {"vars", builtin_vars, 1, vars_doc}, 2253 {"vars", builtin_vars, 1, vars_doc},
2272 {"xrange", builtin_xrange, 1, xrange_doc}, 2254 {"xrange", builtin_xrange, 1, xrange_doc},
2273 {"zip", builtin_zip, 1, zip_doc}, 2255 {"zip", builtin_zip, 1, zip_doc},
2274 {NULL, NULL}, 2256 {NULL, NULL},
2275 }; 2257 };