Can we use Python 4's end keyword in Python 2.7?

Question:

Because of my ancient animation pipeline, I am stuck with python 2.7. I saw that python 4 will have an end keyword which can already be used in python 3 with pyend (https://pypi.org/project/pyend/).
I am using that in some python 3 projects already and it’s pretty cool.

However, the pypi page states "Requires: Python >=3.7". Now my question is, does that mean that pyend itself needs Python 3.7 or newer to run on but it can be used on older python code or can it only be used on code that is >=3.7? I have tried with some python 2 code and it seems to be working fine but I would rather be sure before I switch.

Asked By: Mircode

||

Answers:

I’m 99% sure this package is an April Fools Day joke since I’ve never heard of any features of Python 4 and including end seems to go against Python’s philosophy.

The first two releases mention nothing of Python 4. Also, take note of this paragraph, "Does it stop there?"

It sure does not! It also uses tabs instead of spaces for indentation. Because using tabs instead of spaces is much better. However, if you hold the opinion that your pristine code should look the same everywhere, you can set the --convert-tabs-to-spaces-despite-tabs-being-objectively-better-than-spaces flag, which will convert indentation tabs into 11 spaces. Should you not like 11 spaces for indentation and you would rather enforce your personal taste onto everyone else, you can set the --use-this-many-spaces-per-tab-cuz-as-a-spacist-i-want-uniformity-but-i-dont-want-the-default flag to whatever your heart desires.

That flag is definitely a joke.

Another thing is the release date and versioning. Version 1.4.23 came out today, April 1st, after just having 0.0.10.0.3

enter image description here

That being said, to answer the question is that since pyend is a command you run in the terminal, and not something you import, it can probably handle all python3.x code, it can almost definitely handle all python3.7+ code, and it probably cannot handle python2.x code. The syntax for Python 2 is different from Python 3 (the most common example is that print is a statement in v2 but a function in v3).

Answered By: Samathingamajig
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.