mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
feat: add Bytes.d.er
/Obj.d.er
This commit is contained in:
parent
7389f68e3e
commit
b552cad3b2
10 changed files with 192 additions and 55 deletions
|
@ -2,6 +2,7 @@ from _erg_result import Error
|
|||
from _erg_control import then__
|
||||
|
||||
class Float(float):
|
||||
EPSILON = 2.220446049250313e-16
|
||||
def try_new(i): # -> Result[Nat]
|
||||
if isinstance(i, float):
|
||||
Float(i)
|
||||
|
@ -37,6 +38,7 @@ class Float(float):
|
|||
class FloatMut(): # inherits Float
|
||||
value: Float
|
||||
|
||||
EPSILON = 2.220446049250313e-16
|
||||
def __init__(self, i):
|
||||
self.value = Float(i)
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue