-- ~Ethan~ _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/24OF6XMFYK4PO2VPY6UFT2S3CBZFNOKB/ Code of Conduct: http://python.org/psf/codeofconduct/
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?
- [Python-Dev] str() vs format(): trivia question Ethan Furman
- [Python-Dev] Re: str() vs format(): trivia question Guido van Rossum
- [Python-Dev] Re: str() vs format(): trivia quest... Ethan Furman
- [Python-Dev] Re: str() vs format(): trivia q... Brandt Bucher
- [Python-Dev] Re: str() vs format(): trivia q... Guido van Rossum
- [Python-Dev] Re: str() vs format(): triv... Ethan Furman
- [Python-Dev] Re: str() vs format():... MRAB
- [Python-Dev] Re: str() vs forma... Ethan Furman
- [Python-Dev] Re: str() vs format(): triv... Serhiy Storchaka
- [Python-Dev] Re: str() vs format(): trivia question Eric V. Smith
- [Python-Dev] Re: str() vs format(): trivia quest... Eric V. Smith