New submission from Roger Taylor <roger.taylor.em...@gmail.com>:

An IntFlag member before 3.8.6 was converted to an integer in an f-string. 
After 3.8.6, the textual IntFlag class and member name are placed in the 
interpolated f-string instead of the integer.

3.8.3: f"... {X.F} ..." where X.F = 1 << 4 will give "... 16 ..."
3.8.5: Same
3.8.6: f"... {X.F} ..." where X.F = 1 << 4 will give "... X.F ..."

I have reproduced this on Linux using the version compiled and installed by 
pyenv, and on Windows using the 32-bit versions from the downloadable 
standalone installer.

Now I have to locate and go through all my SQL statements and verify that they 
explicitly convert IntFlag values to integer to avoid the errors introduced by 
this regression.

----------
components: Interpreter Core
messages: 377793
nosy: rt121212121
priority: normal
severity: normal
status: open
title: Regression in IntFlag behaviour in f-string
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41907>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to