bug: Cannot use `_rlz.instance_of(list)`
See original GitHub issueThe following code now raises a TypeError
import ibis.expr.rules as _rlz
import ibis.expr.operations as _ops
class Blah(_ops.TableNode):
test = _rlz.instance_of(list)
Blah(test=["abc"])
Traceback (most recent call last):
File "/home/gmanoim/tmp/tmp.py", line 12, in <module>
Blah(test=["abc"])
File ".../ibis/common/grounds.py", line 21, in __call__
return cls.__create__(*args, **kwargs)
File ".../ibis/common/grounds.py", line 152, in __create__
return super().__create__(**kwargs)
File ".../ibis/common/grounds.py", line 30, in __create__
return type.__call__(cls, *args, **kwargs)
File ".../ibis/common/grounds.py", line 163, in __init__
object.__setattr__(self, "_hash", hash((self.__class__, args)))
TypeError: unhashable type: 'list'
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
how to instanceof List<MyType>? - java
You probably need to use reflection to get the types of them to check. To get the type of the List: Get generic...
Read more >Wrong compiler error reported for generic instanceof pattern ...
ecj <= 15: > Cannot perform instanceof check against parameterized type Map<?,T>. Use > the form Map<?,?> instead since further generic type information ......
Read more >Stuck on instanceOf - ArrayList - Java
I'm trying to check for the object inside the ArrayList and for some reason I've not been able to get the instanceOf to...
Read more >Identifying if object is of type Set or List at runtime
Hello,. In Apex, at runtime we want to check if Object obj is of type Set or List where the type of elements...
Read more >Java instanceof Operator
The instanceof operator can't be used if there's no relationship between the object that's being compared and the type it's being compared with....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
By ‘ibis.common.validators.tuple_of(inner_validator)’ any iterable should be accepted but still represented as a tuple internally. Could you please try that?
Closing, please reopen if this is still an issue.