python (3.11.7)
eo d dl mZ d dlZd dlZd dlZd dlZd dlZdgZej j Z
ej j Z ej
dej ej z Z G d dej ZdS ) DecimalNFractiona
\A\s* # optional whitespace at the start,
(?P<sign>[-+]?) # an optional sign, then
(?=\d|\.\d) # lookahead for digit or .digit
(?P<num>\d*|\d+(_\d+)*) # numerator (possibly empty)
(?: # followed by
(?:/(?P<denom>\d+(_\d+)*))? # an optional denominator
| # or
(?:\.(?P<decimal>d*|\d+(_\d+)*))? # an optional fractional part
(?:E(?P<exp>[-+]?\d+(_\d+)*))? # and optional exponent
)
\s*\Z # and optional whitespace to finish
c j e Zd Z dZd-dd fdZed Zed Zd Zd.dZ e
d Ze
d
Zd Z
d Zd Zd Z eeej \ ZZd Z eeej \ ZZd Z eeej \ ZZd Z eeej \ ZZ d Z! ee!ej"