mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
fix: dict update!
bug
This commit is contained in:
parent
a8c1113df7
commit
0a24c0cb77
15 changed files with 97 additions and 23 deletions
|
@ -153,6 +153,9 @@ class IntMut: # inherits Int
|
|||
def __neg__(self):
|
||||
return IntMut(-self.value)
|
||||
|
||||
def update(self, f):
|
||||
self.value = Int(f(self.value))
|
||||
|
||||
def inc(self, i=1):
|
||||
self.value = Int(self.value + i)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue