mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +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 isinstance(elem, y):
|
||||
return True
|
||||
elif is_ok(y.try_new(elem)):
|
||||
elif hasattr(y, "try_new") and is_ok(y.try_new(elem)):
|
||||
return True
|
||||
# TODO: trait check
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue