summaryrefslogtreecommitdiff
path: root/Modules/unicodedata.c
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2013-11-23 15:37:55 -0800
committerLarry Hastings <larry@hastings.org>2013-11-23 15:37:55 -0800
commited72aeef785d775a72872c2eeb68610a03468c2a (patch)
tree07d298d497ab6ff36538024995bd9c06f2157f3b /Modules/unicodedata.c
parent4eb5234e515d6fb0f13827502e6e6ef5b85f81b1 (diff)
downloadcpython-ed72aeef785d775a72872c2eeb68610a03468c2a.tar.gz
Issue #19674: inspect.signature() now produces a correct signature
for some builtins.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r--Modules/unicodedata.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 62ab957e21..eca0054b45 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -17,6 +17,12 @@
#include "ucnhash.h"
#include "structmember.h"
+/*[clinic]
+module unicodedata
+class unicodedata.UCD
+[clinic]*/
+/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+
/* character properties */
typedef struct {
@@ -108,8 +114,7 @@ static Py_UCS4 getuchar(PyUnicodeObject *obj)
/* --- Module API --------------------------------------------------------- */
/*[clinic]
-module unicodedata
-class unicodedata.UCD
+
unicodedata.UCD.decimal
unichr: object(type='str')
@@ -124,10 +129,9 @@ not given, ValueError is raised.
[clinic]*/
PyDoc_STRVAR(unicodedata_UCD_decimal__doc__,
+"decimal(unichr, default=None)\n"
"Converts a Unicode character into its equivalent decimal value.\n"
"\n"
-"unicodedata.UCD.decimal(unichr, default=None)\n"
-"\n"
"Returns the decimal value assigned to the Unicode character unichr\n"
"as integer. If no such value is defined, default is returned, or, if\n"
"not given, ValueError is raised.");
@@ -157,7 +161,7 @@ exit:
static PyObject *
unicodedata_UCD_decimal_impl(PyObject *self, PyObject *unichr, PyObject *default_value)
-/*[clinic checksum: a0980c387387287e2ac230c37d95b26f6903e0d2]*/
+/*[clinic checksum: 9576fa55f4ea0be82968af39dc9d0283e634beeb]*/
{
PyUnicodeObject *v = (PyUnicodeObject *)unichr;
int have_old = 0;