mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 12:51:10 +00:00
Update _erg_std_prelude.py
This commit is contained in:
parent
e09f7cfdb2
commit
701c1f2e40
1 changed files with 2 additions and 2 deletions
|
@ -4,12 +4,12 @@ def in_operator(x, y):
|
|||
return True
|
||||
# TODO: trait check
|
||||
return False
|
||||
elif type(y) == list or type(y) == set:
|
||||
elif (type(y) == list or type(y) == set) and type(y[0]) == type:
|
||||
# FIXME:
|
||||
type_check = in_operator(x[0], y[0])
|
||||
len_check = len(x) == len(y)
|
||||
return type_check and len_check
|
||||
elif type(y) == dict:
|
||||
elif type(y) == dict and type(y[0]) == type:
|
||||
NotImplemented
|
||||
else:
|
||||
return x in y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue