We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f15da4f commit 49e06d9Copy full SHA for 49e06d9
dpath/segments.py
@@ -229,9 +229,9 @@ def match(segments: Path, glob: Glob):
229
g = '*'
230
231
try:
232
- # If search path segment (s) is an int and the current evaluated index (g) is int-like,
233
- # then g might be a sequence index as well. Try converting it to an int.
234
- if isinstance(s, int) and isinstance(g, str):
+ # If search path segment (s) is an int then assume currently evaluated index (g) might be a sequenc
+ # index as well. Try converting it to an int.
+ if isinstance(s, int):
235
return s == int(g)
236
except:
237
# Will reach this point if g can't be converted to an int (e.g. when g is a RegEx pattern).
0 commit comments