Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
You should be careful when matching unicode regexes:
Lines 11 to 13 ina0f5c8e
| NUMBER_RE=re.compile( | |
| r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', | |
| (re.VERBOSE|re.MULTILINE|re.DOTALL)) |
>>>importsys>>>sys.modules["_json"]=None>>>importjson>>>json.loads("[1\uff10, 0.\uff10, 0e\uff10]")[10,0.0,0.0]
I think it's safer to use[0-9] instead of\d here.
CPython versions tested on:
3.13
Operating systems tested on:
macOS