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 6c513fa commit e37fdadCopy full SHA for e37fdad
dpath/segments.py
@@ -229,10 +229,10 @@ def match(segments: Path, glob: Glob):
229
g = '*'
230
231
try:
232
- # If search path segment (s) is an int then assume currently evaluated index (g) might be a sequenc
+ # If search path segment (s) is an int then assume currently evaluated index (g) might be a sequence
233
# index as well. Try converting it to an int.
234
- if isinstance(s, int):
235
- return s == int(g)
+ if isinstance(s, int) and s == int(g):
+ continue
236
except:
237
# Will reach this point if g can't be converted to an int (e.g. when g is a RegEx pattern).
238
# In this case convert s to a str so fnmatch can work on it.
0 commit comments