Closed
Description
Possible Refactoring
The quopri
module conditionally imports binascii
and uses custom code if binascii
can't be found. For example, the encode()
function currently has 60 lines (including empty lines and the docstring), of which only 47 lines are dedicated to the workaround:
Lines 44 to 104 in e9ac890
This is essentially dead code, since I don't think there are any (sane) scenarios nowadays, where binascii
is not available. I recommend to remove the conditional import and dead code. I'm willing to write a PR.
Your environment
- CPython versions tested on: Seen on cpython HEAD as of 2022-11-03