Day 220
Here’s a cool bug from a CPython hops function
–
The issue comes from the hops type and the default value I set in the function
–
I tried node_index=""
because hops doesn’t allow None on default…
Is there a reason why hops doesn’t allow : node_index=None
?
My solution is to use default = -1, but the question above remains 
Cheers
shouldn’t it be node_indices = []
, since you defined the input as list?
I tried that before yes…
What I ended up doing is write it there (line 272)
hs.HopsInteger("Index", "I", "Indexes to read data from", hs.HopsParamAccess.LIST, default=-1)
Setting it to -1 while declaring a hops LIST param access seems to set the default to [-1], so I can use the -1 as a special value to have a different behavior.
1 Like