urllib.urlencode currently uses `str()` on its non-bytes objects before encoding the result. This causes a
compatibility break when integer module constants are converted to IntEnum, as `str(IntEnum.MEMBER)` no longer returns
the integer representation; however, `format()` does still return the integer representation.
The fix is to add a separate branch to check if the argument is an Enum, and use the value if so -- but it got me
wondering: in general, are there differences between calling str() vs calling format() on Python objects?
--
~Ethan~
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/24OF6XMFYK4PO2VPY6UFT2S3CBZFNOKB/
Code of Conduct: http://python.org/psf/codeofconduct/