Live data from Hacker News

Show HN: Python-to-Python compiler for some 3.6 features in older versions

github.com

51–60 of 113 posts

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#51
post #24

I'm confused with the way the "Supported features" section is divided. Does it mean I can only use f''-strings if the target version is 3.5? Why such a limitation?

it means if your target is 3.5 those are the only features that need to be compiled to another form; the lower ones already work

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#52

Serious question: Why would anyone still be doing anything with Python 2.7 except porting the last remnants of their code base to 3.X?

Because it's going to be stable for the next N years.

Python 2 is like FORTRAN. It might not be sexy anymore but it's not going anywhere.

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#53

Serious question: Why would anyone still be doing anything with Python 2.7 except porting the last remnants of their code base to 3.X?

Most shared-hosting services don't support a reasonable version of Python 3 yet. HostGator still has Python 3.2, the "maximally incompatible" version.

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#54
post #8

I am not a Python developer, but thanks for not using the unnecessary term "transpiler".

I never understood the insistence in this. A transpiler is "a compiler that targets a high-level language." It's a term that adds information above and beyond compiler. All transpilers are compilers, not all compilers are transpilers.

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#55
post #53

Serious question: Why would anyone still be doing anything with Python 2.7 except porting the last remnants of their code base to 3.X?

Most shared-hosting services don't support a reasonable version of Python 3 yet. HostGator still has Python 3.2, the "maximally incompatible" version.

Ouch

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#56

Serious question: Why would anyone still be doing anything with Python 2.7 except porting the last remnants of their code base to 3.X?

Because it's going to be stable for the next N years. Python 2 is like FORTRAN. It might not be sexy anymore but it's not going anywhere.

> Python 2 is like FORTRAN. It might not be sexy anymore but it's not going anywhere.

Except Fortran is, and is going to be, further developed. (So, if a new useful programming concept appears, or a major design mistake is discovered, it always can be patched.)

Python 2 is going to be abandoned in 2020. Python 3 will supersede it.

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#57
post #49

Earlier quoted context omitted.

OK, but this has been a very long transition. There has been lots of time to evolve to 3.x. Has the primary barrier been the slow transition of library dependancies? I'd really like to understand this from a technology transition management standpoint. If you'll allow a strained analogy, the 2.7 to 3.x transition appears in retrospect like an exercise in herding cats, because the transition was done using cat-herding…

Asking this question without disqualifying the answer "No breaking changes whatsoever" usually just generates a bunch of different ways of phrasing that.

No, I don't buy that. IBM successfully transitioned a huge customer base from 709/7090 36-bit words to System 360 32 bit words. The transition from 32 to 64 bit addresses was rocky for a lot of architectures. DEC Alpha, Intel Itanium. But are you still running a 32 bit OS?

K&R C no longer compiles. Not that the C to C++14 transition is what I would call an example of greatness, but it is somewhere along the success spectrum.

Seriously, you will someday need to transition your customer base. How do you plan to do it?

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#58
post #37

Serious question: Why would anyone still be doing anything with Python 2.7 except porting the last remnants of their code base to 3.X?

"Why don't you just rewrite it in X?" Because Python 3.X is not backwards compatible and we have millions of lines of production code in Python 2.X.

> Because Python 3.X is not backwards compatible and we have millions of lines of production code in Python 2.X.

I believe the common subset of Python 2 and 3 was created to ease that transition.

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#59

Serious question: Why would anyone still be doing anything with Python 2.7 except porting the last remnants of their code base to 3.X?

Distributing a tool to OS distributions that do not have Python3.x (e.g. RedHat/CentOS 7) where the requirements include 'Not installing any additional packages'

I hate it because Python2 is a flaming garbage heap, and 2.7 is what happens when you piss on a flaming garbage heap to put it out, whereas Python 3 is actually a nice language to work in, but until OS distributions get their act together on the Python front, some stuff is going to continue sucking.

Re: Show HN: Python-to-Python compiler for some 3.6 features in older versions

#60
post #45

Serious question: Why would anyone still be doing anything with Python 2.7 except porting the last remnants of their code base to 3.X?

Thank you for signing up to help in the porting effort for FreeCAD and Pyspread to Python 3. Free software projects depend on volunteer contributors like you.

So I've been following FreeCAD since it started. Even tried to get my head around the code base at one point, but the hacking guide was mostly nonexistent in those days, so I moved on to projects that did not skip that very important step.

Just to put a stake in the ground, when did FreeCAD start? When did 3.0 come out, along with the announced end-of-life date for 2.7?

Post reply on HN