[Python-Dev] PEP 460 reboot (original) (raw)
Paul Moore p.f.moore at gmail.com
Mon Jan 13 22:01:23 CET 2014
- Previous message: [Python-Dev] PEP 460 reboot
- Next message: [Python-Dev] PEP 460 reboot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 13 January 2014 18:58, Guido van Rossum <guido at python.org> wrote:
I hear the objections against b'%s' % 'x' returning b"'x'" loud and clear, and if the noise about that sub-issue is preventing folks from seeing the absurdity in PEP 460, we can talk about a compromise, e.g. use %b which would require its argument to be bytes. Those bytes should still probably be ASCII-ish, but there's no way to test that. That's fine with me and should be fine to Nick as well -- PEP 460 doesn't check that your encodings match (how could it? :-), nor does plain string concatenation using +.
For the record, Guido's reboot posting and rationale has convinced me, and I am essentially in favour of his proposal.
Nick's remaining objection seems to me to have some validity if the format string is a user-supplied variable, but this type of usage is vanishingly small in my experience, and shouldn't dictate the whole design.
I don't like b'%s' % 'x' behaviour, and would prefer one of the alternatives. I'm not entirely clear about the details of the alternative proposals, so I won't try to pick one.
I think this should be for 3.5, and should not involve an accelerated release of 3.5 - we should get it into the 3.5 code early and let people thrash out the details during the 3.5 release cycle.
Paul.
PS For all the heated arguments and occasional frayed tempers, this has been an impressively civil debate. I think that's one of the best things about python-dev, that discussions like these never degenerate into flamewars. Kudos to all concerned!
- Previous message: [Python-Dev] PEP 460 reboot
- Next message: [Python-Dev] PEP 460 reboot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]