Skip to content

Commit 6c03279

Browse files
committed
early return
1 parent 62b49f9 commit 6c03279

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pandas/_libs/parsers.pyx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,6 @@ cdef class TextReader:
13551355
coliter_t it
13561356
const char *word = NULL
13571357
const char *ch
1358-
bint found_float = False
13591358

13601359
coliter_setup(&it, self.parser, col, start)
13611360

@@ -1371,14 +1370,10 @@ cdef class TextReader:
13711370
or ch[0] == b"e"
13721371
or ch[0] == b"E")
13731372
if token_indicates_float:
1374-
found_float = True
1375-
break
1373+
return True
13761374
ch += 1
13771375

1378-
if found_float:
1379-
break
1380-
1381-
return found_float
1376+
return False
13821377

13831378
# Factor out code common to TextReader.__dealloc__ and TextReader.close
13841379
# It cannot be a class method, since calling self.close() in __dealloc__

0 commit comments

Comments
 (0)