Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Spreading the Python 3 religion (was Re: PEP 414 - Unicode Literals for Python 3)

Barry Warsawbarry at python.org
Tue Feb 28 16:33:46 CET 2012


On Feb 28, 2012, at 10:23 AM, Brett Cannon wrote:>Well, when the code is committed I will update the porting HOWTO and push>the __future__ imports first since they cover more versions of Python (i.e.>Python 3.2). But I will mention the options that skip the __future__>imports for those that choose not to use them (or have already done the>work of using the u prefix in their code). Plus that doc probably will need>an update of caveats that seem to bit everyone (e.g. the str(bytes) thing>which I didn't know about) when trying to do source-compatible versions.See, I think the emphasis should be on using the future imports and unadorningyour unicode literals.  Forget about this PEP except as a footnote.  Thisstrategy works today for most packages.  You might think that this is ugly,but really, I think that doesn't matter (or maybe better: get over it! :).Definitely don't let that stop you from porting *now*.In the small minority of cases where this strategy cannot work for you (and Iadmit to not really understanding what those cases are), then the footnoteabout the reintroduction of the u-prefix should be enough.And yes, the str(bytes) thing is a pain, but it too can be worked around, andis such a minor wart that it should not delay your porting efforts.-Barry-------------- next part --------------A non-text attachment was scrubbed...Name: signature.ascType: application/pgp-signatureSize: 836 bytesDesc: not availableURL: <http://mail.python.org/pipermail/python-dev/attachments/20120228/37fb2139/attachment.pgp>


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp