Python Forum
Can we use Python 4's end keyword in Python 2.7? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Can we use Python 4's end keyword in Python 2.7? (/thread-39720.html)



Can we use Python 4's end keyword in Python 2.7? - mqnc - Apr-01-2023

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.

Cheers!


RE: Can we use Python 4's end keyword in Python 2.7? - Gribouillis - Apr-01-2023

(Apr-01-2023, 01:39 PM)mqnc Wrote: I saw that python 4 will have an end keyword
Do you have any reference or link for python 4 implementing an end keyword? This looks like a joke to me.

Also in your module, there is this line
end = None
With this definition one can obviously scatter 'end' keywords everywhere in the code.


RE: Can we use Python 4's end keyword in Python 2.7? - Yoriz - Apr-01-2023

Only usable on April the 1st.


RE: Can we use Python 4's end keyword in Python 2.7? - Gribouillis - Apr-01-2023

(Apr-01-2023, 01:39 PM)mqnc Wrote: I am using that in some python 3 projects already and it's pretty cool.
You may find my adddot.py extension useful. With it you can actually write Python 3 code without the 'dot' operator.


RE: Can we use Python 4's end keyword in Python 2.7? - DeaD_EyE - Apr-01-2023

I saw the post and after the first 3 Words... it's an April Foul.

My problem is, that I think the same the whole year about other non-technical news.