mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 12:14:43 +00:00
Fix builtin types methods
This commit is contained in:
parent
c56ef64576
commit
8cdc735486
12 changed files with 180 additions and 7 deletions
|
@ -19,3 +19,9 @@ def with__(obj, body):
|
|||
|
||||
def discard__(obj):
|
||||
pass
|
||||
|
||||
def then__(x, f):
|
||||
if x == None or x == NotImplemented:
|
||||
return x
|
||||
else:
|
||||
return f(x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue