question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Cannot use `_rlz.instance_of(list)`

See original GitHub issue

The 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:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kszucscommented, Apr 8, 2022

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?

0reactions
cpcloudcommented, Apr 18, 2022

Closing, please reopen if this is still an issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found