Movatterモバイル変換


[0]ホーム

URL:


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

Nick Coghlanncoghlan at gmail.com
Tue Feb 28 13:49:06 CET 2012


On Tue, Feb 28, 2012 at 10:19 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:>> Le mardi 28 février 2012 à 22:14 +1000, Nick Coghlan a écrit :>> If you're using separate branches, then your Python 2 code isn't being>> made forward compatible with Python 3. Yes, it avoids making your>> Python 2 code uglier, but it means maintaining two branches in>> parallel until you drop Python 2 support.>> IMO, maintaining two branches shouldn't be much more work than> maintaining hacks so that a single codebase works with two different> programming languages.Aside from the unicode literal problem, I find that the Python2.6+/3.2+ subset is still a fairly nice language for an applicationlevel web program. Most of the rest of the bytes/text ugliness ishidden away below the framework layer where folks like Chris, Arminand Jacob have to deal with it, but it doesn't affect me as aframework user.>> You've once again raised the>> barrier to entry: either people contribute two patches, or they accept>> that their patch may languish until someone else writes the patch for>> the other version.>> Again that's wrong. If you cleverly use 2to3 to port between branches,> patches only have to be written against the 2.x version.Apparently *you* know how to do that, but I don't. If I, as a CPythoncore developer, don't know how to do that, how is it reasonable toexpect J. Random Hacker to become a Python 3 porting export?PEP 414 is all about lowering the barrier to entry for successfulPython 3 ports. OK, fine some very clever people have invested a lotof time in finding ways to deal with the status quo that make it lesspainful. That doesn't mean it isn't painful - it just means the earlyadopters have steeled themselves against the pain and learned to suckit up and cope. Now that we've discovered some of the key sources ofpain, we can live with a few pragmatic concessions in the purity ofPython 3's language definition to ease the transition for the vastnumber of Python 3 ports which have yet to begin.Cheers,Nick.-- Nick Coghlan   |  ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp