summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-09-28 12:09:05 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-09-28 12:09:05 (GMT)
commit9c6e6a0c7fbc2a15bbd3092e8a75bec80da58b3d (patch)
tree8006ca48906b1d320341439b0f87c913b8755ca9 /Objects
parentd83f226d93cc24be3d6db953c8e8bd3d751c81a9 (diff)
downloadcpython-9c6e6a0c7fbc2a15bbd3092e8a75bec80da58b3d.zip
cpython-9c6e6a0c7fbc2a15bbd3092e8a75bec80da58b3d.tar.gz
cpython-9c6e6a0c7fbc2a15bbd3092e8a75bec80da58b3d.tar.bz2
don't check that the first character is XID_Continue
Current, XID_Continue is a superset of XID_Start, but that may sometime change.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 2ae1947..aff205d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -10196,7 +10196,7 @@ PyUnicode_IsIdentifier(PyObject *self)
if (!_PyUnicode_IsXidStart(first) && first != 0x5F /* LOW LINE */)
return 0;
- for (i = 0; i < PyUnicode_GET_LENGTH(self); i++)
+ for (i = 1; i < PyUnicode_GET_LENGTH(self); i++)
if (!_PyUnicode_IsXidContinue(PyUnicode_READ(kind, data, i)))
return 0;
return 1;