Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] PEP 414 - Unicode Literals for Python 3

R. David Murrayrdmurray at bitdance.com
Mon Feb 27 15:22:41 CET 2012


On Mon, 27 Feb 2012 11:21:16 +0100, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <martin at v.loewis.de> wrote:> I find this rationale a bit sad: it's not that there is any (IMO) good> technical reason for the feature - only that people "hate" the many> available alternatives for some reason.>> But then, practicality beats purity, so be it.Agreed on both counts (but only reluctantly on the second :)The PEP does not currently contain a discussion of the unicode_literals +str() alternative and why that is not considered acceptable.  That shouldbe added (and I'm very curious why it isn't acceptable, it seems veryelegant to me).In fact, I'd like to see the PEP contain a bullet list of alternativeswith a discussion of why each is unacceptable or insufficient.  The textas organized now is hard to follow for that purpose.Other comments:I disagree that "it is clear that 2to3 as a tool is insufficient" andthat *therefore* people are attempting to use unified source.  I thinkthe truth is that people just prefer the unified source approach,because that is more Pythonic.I also strongly disagree with the statement that unicode_literals isdoing more harm that good.  Many people are using it very successfully.In *certain contexts* (WSGI) it may be problematic, but that doesn'tmean it was a bad idea or that it shouldn't be used (given that aproject uses it consistently, as noted previously in this thread).As noted above, the native string type *is* available withunicode_literals, it is spelled "str('somestring').I don't understand the "Who Benefits?" section at all.  For example, Ithink you'll agree I'm experienced working with email issues, and I don'tunderstand how this proposal would help at all in dealing with email.The PEP would be strengthened by providing specific examples of theclaims made in this section.I am -0 on this proposal.  I will bow to the experience of those actuallytrying to port and support web code, which I am not doing myself.But I'd like to see the PEP improved so that the proposal is as strongas possible.--David


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp