X-Received: by 10.236.150.110 with SMTP id y74mr7922097yhj.7.1405494718169; Wed, 16 Jul 2014 00:11:58 -0700 (PDT) X-Received: by 10.182.125.99 with SMTP id mp3mr2229obb.26.1405494717893; Wed, 16 Jul 2014 00:11:57 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!j15no1022342qaq.0!news-out.google.com!gf2ni862igb.0!nntp.google.com!h18no2427355igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Wed, 16 Jul 2014 00:11:57 -0700 (PDT) In-Reply-To: <87egxl4zq8.fsf@elektro.pacujo.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:120b:2c6f:21f0:452e:aa3f:a2c5:c167; posting-account=ung4FAoAAAC46zhHJ0Nsnuox7M5gDvs_ NNTP-Posting-Host: 2a02:120b:2c6f:21f0:452e:aa3f:a2c5:c167 References: <57ajo9poljjre4c4ig0n0ss8kph8k78lp0@4ax.com> <5389cb53$0$29978$c3e8da3$5496439d@news.astraweb.com> <99b7b2a2-7521-42d7-a5a0-1a35d4d5b922@googlegroups.com> <53C4A454.9010600@gmail.com> <87zjga4j4v.fsf@elektro.pacujo.net> <53c57bae$0$9505$c3e8da3$5496439d@news.astraweb.com> <87iomy4ciy.fsf@elektro.pacujo.net> <53c5f6dc$0$9505$c3e8da3$5496439d@news.astraweb.com> <87egxl4zq8.fsf@elektro.pacujo.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Python 3 is killing Python From: wxjmfauth@gmail.com Injection-Date: Wed, 16 Jul 2014 07:11:57 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 5978 X-Received-Body-CRC: 974261841 Xref: csiph.com comp.lang.python:74539 Le mercredi 16 juillet 2014 07:52:31 UTC+2, Marko Rauhamaa a =E9crit : > Steven D'Aprano : >=20 >=20 >=20 > > On Tue, 15 Jul 2014 23:01:25 +0300, Marko Rauhamaa wrote: >=20 > >> In fact, I find the lazy use of Unicode strings at least as scary as >=20 > >> the lazy use of byte strings, especially since Python 3 sneaks >=20 > >> Unicode to the outer interfaces of the program (files, IPC). >=20 > > >=20 > > I'm not entirely sure I understand what you mean by "lazy use of >=20 > > Unicode strings". And I especially don't understand what you mean by >=20 > > "sneak". The fact that strings are Unicode is *the* biggest and most >=20 > > obvious new feature of Python 3. >=20 >=20 >=20 > I mean that sys.stdin and sys.stdout should deal with byte strings. I >=20 > mean that open(path) should open a file in binary mode. Thankfully, the >=20 > subprocess methods exchange bytes by default. >=20 >=20 >=20 > To me, the main difference between Python 2 and Python 3 is that in the >=20 > former, I use "..." everywhere, and in the latter, I use b"..." >=20 > everywhere. If I should need advanced text processing features, I'll go >=20 > through a decode() and encode(). >=20 >=20 >=20 > > The Python devs aren't slaves, they get to choose what features they >=20 > > work on and which they don't. They don't owe *anybody* any feature >=20 > > they don't want to build, or care to support, and that includes >=20 > > continuing the 2.x series. >=20 >=20 >=20 > No need to erect straw men. Of course, the Python gods do whatever they >=20 > want. And you asked me to clarify my opinion, which I did. The breakage >=20 > of backward compatibility wasn't worth the new features. >=20 >=20 >=20 > But as I said, what is done is done. We'll live with the reality. >=20 >=20 >=20 > > As of right now, *new* projects ought to be written in Python 3.3 or >=20 > > better, unless you have a compelling reason not to. You don't have to >=20 > > port old projects in order to take advantage of Python 3 for new >=20 > > projects. >=20 >=20 >=20 > But my distro only provides Python 3.2. What's wrong with Python 3.2? >=20 > Why didn't anybody tell me to put off the migration? >=20 >=20 >=20 >=20 >=20 > Marko ----------- From a unicode perspective, Py32 is the best Python. (Yes it's ucs2). (From a BDFL example) >>> sys.version_info sys.version_info(major=3D3, minor=3D2, micro=3D5, releaselevel=3D'final', s= erial=3D0) >>> timeit.repeat("a =3D 'hundred'; 'x' in a") [0.09090468709446498, 0.07743860966057525, 0.07695655307486504] >>> timeit.repeat("a =3D 'hundre EURO'; 'x' in a") [0.09373873872100091, 0.07633783502242864, 0.0762649751626725] sys.version_info sys.version_info(major=3D3, minor=3D4, micro=3D0, releaselevel=3D'final', s= erial=3D0) timeit.repeat("a =3D 'hundred'; 'x' in a") [0.1174619090622306, 0.09338822371994088, 0.09350361798433393] timeit.repeat("a =3D 'hundre EURO'; 'x' in a") [0.2306057883810979, 0.21599837108983877, 0.2168407886036121] >>> sys.version_info sys.version_info(major=3D3, minor=3D4, micro=3D0, releaselevel=3D'final', s= erial=3D0) >>> sys.getsizeof('hundred') 32 >>> sys.getsizeof('hundre EURO') 52 >>> sys.getsizeof('hundred') 44 >>> sys.getsizeof('hundre EURO') 44 Just an illustration of a systematical behaviour. Not only Py32 works much better than Py33+, it works much better for non ascii users! The Py devs succeeded to transform Python into a ascii product! In my mind, it would be nicer to spend time in solving bugs, instead of reinventing "unicode". And before reinventing "unicode", it would be good to undersand it (I fell by chance on a video: "The Guts of Unicode in Python"). Hobbyist tools will alway stay hobbyist tools. ------ Something different, "micropython". Luckily they are people who are understanding "unicode" as whole very correctly and are not following py devs advices. I'm thinking about this UEFI stuff. It is beyond my knowledge. it seems to me that it is a similar situation. jmf