[issue44954] Bug in float.fromhex

2021-08-20 Thread Pedro Gimeno
Pedro Gimeno added the comment: > @Pedro Thanks again for the report! Just out of curiosity, how did you manage > to find this? I'm writing a C strtod implementation and I was adding corner cases to the unit testing (now published here: https://codeberg.org/pgimeno/ACSL/src/br

[issue44954] Bug in float.fromhex

2021-08-19 Thread Pedro Gimeno
New submission from Pedro Gimeno : >>> float.fromhex('0x0.8p-1074') 0.0 >>> float.fromhex('0x.8p-1074') 5e-324 One of them is obviously wrong. It's the second one, because: - The smallest denormal is 0x1p-1074 - Therefore, 0x0.8p-1074 is a tie for

[issue38800] Resume position for UTF-8 codec error handler not working

2019-11-14 Thread Pedro Gimeno
Pedro Gimeno added the comment: Python 3.5 from Debian stretch (oldstable). You're right, I can't reproduce it in 3.7 from Buster. Sorry for the bogus report. -- ___ Python tracker <https://bugs.python.o

[issue38800] Resume position for UTF-8 codec error handler not working

2019-11-14 Thread Pedro Gimeno
Pedro Gimeno added the comment: I forgot the quotes in the assertion, it should have been "b'xz'". -- ___ Python tracker <https://bug

[issue38800] Resume position for UTF-8 codec error handler not working

2019-11-14 Thread Pedro Gimeno
New submission from Pedro Gimeno : When implementing an error handler, it must return a tuple consisting of a substitution string and a position where to resume decoding. In the case of the UTF-8 codec, the resume position is ignored, and it always resumes immediately after the character

[issue2506] Add mechanism to disable optimizations

2014-06-22 Thread Pedro Gimeno
Pedro Gimeno added the comment: I consider peephole optimization when no optimization was requested a bug. Documentation for -O says it "Turns on basic optimizations". Peephole optimization is a basic optimization, yet it is performed even when no basic optimizations were requested