mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
Add std
This commit is contained in:
parent
0ac63d8362
commit
b997c685dd
9 changed files with 113 additions and 25 deletions
8
compiler/erg_compiler/std/prelude.py
Normal file
8
compiler/erg_compiler/std/prelude.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
def in_operator(x, y):
|
||||
if type(y) == type:
|
||||
if isinstance(x, y):
|
||||
return True
|
||||
# TODO: trait check
|
||||
return False
|
||||
else:
|
||||
return x in y
|
Loading…
Add table
Add a link
Reference in a new issue