I have some value in variable v
, how do I check its type?
Hint: It is NOT v.dtype
.
When I do type(v)
in the debugger, I get
type(v) = {type} <type 'h5py.h5r.Reference'>
or
type(v) = {type} <class 'h5py._hl.dataset.Dataset'>
How to check these values at runtime?
"Check" means calculate the boolean result, saying if the type is given.
UPDATE
In the so-called "duplicate" question it is said that to compare the type one should use
type(v) is str
which implicitly assumes that types are strings. Are they?