mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-27 19:59:07 +00:00
fix: visibility bug
This commit is contained in:
parent
0d43299cce
commit
62b06022cb
6 changed files with 23 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
from _erg_result import is_ok
|
||||
from _erg_range import Range
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
def in_operator(elem, y):
|
||||
if type(y) == type:
|
||||
|
@ -18,6 +19,8 @@ def in_operator(elem, y):
|
|||
len_check = len(elem) == len(y)
|
||||
return type_check and len_check
|
||||
elif isinstance(y, tuple):
|
||||
if not hasattr(elem, "__iter__"):
|
||||
return False
|
||||
type_check = all(map(lambda x: in_operator(x[0], x[1]), zip(elem, y)))
|
||||
len_check = len(elem) == len(y)
|
||||
return type_check and len_check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue