mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 04:09:05 +00:00
Update _erg_in_operator.py
This commit is contained in:
parent
af0fff8226
commit
e94acfcc0b
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ def in_operator(elem, y):
|
||||||
if type(y) == type:
|
if type(y) == type:
|
||||||
if isinstance(elem, y):
|
if isinstance(elem, y):
|
||||||
return True
|
return True
|
||||||
elif is_ok(y.try_new(elem)):
|
elif hasattr(y, "try_new") and is_ok(y.try_new(elem)):
|
||||||
return True
|
return True
|
||||||
# TODO: trait check
|
# TODO: trait check
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue