You are not logged in.

#1 2021-01-11 19:28:31

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

[SOLVED] Python 3 default and pypy

I just noticed that, although the python package and binary default to the Python 3 version for some time now, this is not the case with the alternative implementation pypy.
The package pypy implements Python 2, whereas to have Python 3 support, you'll need to install pypy3.
This was surprising to me when I installed and ran pypy and f-strings did not work until I started an interactive session and noticed the "Python 2.7.18 […]" hint.
I'd like to know, why pypy still defaults to a Python 2 interpreter and not the Python 3 interpreter as I'd have expected.

Last edited by schard (2021-01-17 19:50:13)

Offline

#2 2021-01-12 14:08:39

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [SOLVED] Python 3 default and pypy

from pypyp website wrote:

Python compatibility

PyPy implements the Python language version 2.7.18. It supports all of the core language, passing Python test suite (with minor modifications that were already accepted in the main python in newer versions). It supports most of the commonly used Python standard library modules; details below.

PyPy3 implements the Python language version 3.7.9. It has been released, but Python is a large language and it is quite possible that a few things are missing.

Arch's package naming merely reflects upstream's wishes. I would read the above as they expect "pypy" to be an implemention of python2 and pypy3 to be an implementation of python3. Also according pypy3 does not implement the whole language yet.

Last edited by Stefan Husmann (2021-01-12 14:08:55)

Offline

#3 2021-01-17 19:50:03

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [SOLVED] Python 3 default and pypy

Sorry, Stefan, I didn't see your response. But this explains it. Thanks.

Offline

Board footer

Powered by FluxBB