Skip to content

Commit 2b12bc0

Browse files
Fix complex parsing signs
Before: print(complex('-9e-17+1j')) # prints (-9e-17-1j) After: print(complex('-9e-17+1j')) # prints (-9e-17+1j)
1 parent fa9b974 commit 2b12bc0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

py/parsenum.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ mp_obj_t mp_parse_num_float(const char *str, size_t len, bool allow_imag, mp_lex
234234
mp_float_t dec_real = 0;
235235
parse_start:
236236
#endif
237+
dec_neg = false;
237238

238239
// skip leading space
239240
for (; str < top && unichar_isspace(*str); str++) {

0 commit comments

Comments
 (0)