~pythonregexp2.7/python/issue2636-09-01+10

« back to all changes in this revision

Viewing changes to Modules/future_builtins.c

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 21:39:45 UTC
  • mfrom: (39055.1.33 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922213945-23717m5eiqpamcyn
Merged in changes from the Single-Loop Engine branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
Return the octal representation of an integer or long integer.");
46
46
 
47
47
 
 
48
static PyObject *
 
49
builtin_ascii(PyObject *self, PyObject *v)
 
50
{
 
51
        return PyObject_Repr(v);
 
52
}
 
53
 
 
54
PyDoc_STRVAR(ascii_doc,
 
55
"ascii(object) -> string\n\
 
56
\n\
 
57
Return the same as repr().  In Python 3.x, the repr() result will\n\
 
58
contain printable characters unescaped, while the ascii() result\n\
 
59
will have such characters backslash-escaped.");
 
60
 
48
61
/* List of functions exported by this module */
49
62
 
50
63
static PyMethodDef module_functions[] = {
51
64
        {"hex",         builtin_hex,        METH_O, hex_doc},
52
65
        {"oct",         builtin_oct,        METH_O, oct_doc},
 
66
        {"ascii",       builtin_ascii,      METH_O, ascii_doc},
53
67
        {NULL,          NULL}   /* Sentinel */
54
68
};
55
69