[New-bugs-announce] [issue44129] zipfile: Add descriptive global variables for general purpose bit flags

Daniel Hillier report at bugs.python.org
Fri May 14 00:53:27 EDT 2021


New submission from Daniel Hillier <daniel.hillier at gmail.com>:

In the zipfile module, masking of bit flags is done against hex numbers eg. if flags & 0x800...

To increase readability I suggest we replace these with global variables named for the purpose of the flag. From the example above:

if flags & 0x800
becomes:
if flags & _MASK_UTF_FILENAME

----------
components: Library (Lib)
messages: 393622
nosy: dhillier, serhiy.storchaka
priority: normal
severity: normal
status: open
title: zipfile: Add descriptive global variables for general purpose bit flags
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44129>
_______________________________________


More information about the New-bugs-announce mailing list