[issue6561] Regex '\d' should not match unicode category 'No'.

Ezio Melotti report at bugs.python.org
Sat Jul 25 20:01:51 CEST 2009


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

This seems to me quite redundant:
+      Matches any Unicode decimal digit; more specifically, matches
+      any character in Unicode category [Nd] (Number, Decimal Digit).
+      This includes ``[0-9]``, and also many other digit characters.
I suggest something like:
Matches the decimal digits ``[0-9]`` and all the characters that belong
to the Unicode category Nd (Number, Decimal Digit).

Two more minor details: instead of '\d', I'd use '^\d$' and instead of
self.assertEqual(re.match('\d', x), None)
self.assertIsNone(re.match('\d', x)).

----------
keywords: +needs review
priority:  -> normal
stage: test needed -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6561>
_______________________________________


More information about the Python-bugs-list mailing list