mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 20:14: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
|
@ -76,6 +76,9 @@ class StrMut: # Inherits Str
|
|||
else:
|
||||
return self.value != other.value
|
||||
|
||||
def update(self, f):
|
||||
self.value = Str(f(self.value))
|
||||
|
||||
def try_new(s: str):
|
||||
if isinstance(s, str):
|
||||
self = StrMut()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue