Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communicate the Python version on the website (Which is not python 3, its actually python 2) #2320

Open
mangelozzi opened this issue Aug 9, 2024 · 0 comments

Comments

@mangelozzi
Copy link

mangelozzi commented Aug 9, 2024

Python 2 is deprecated, and there are some gotcha when developing regex's with it compared to Python 3. I don't think many people use Python 2 anymore. I recommend adding a 2 after the python to help people not get bit by the same issues I have encountered, something like this:

image

E.g. this regex from django:

r"""(?P<matched>import(?s:(?P<import>[\s\{].*?))\s*from\s*['"](?P<url>[./].*?)["']\s*;)"""

Is valid in Python3, but this website says it's invalid, leading one to waste so much time trying to figure out the "error"

@mangelozzi mangelozzi added the bug label Aug 9, 2024
@mangelozzi mangelozzi changed the title Communicate the Python version on the website Communicate the Python version on the website (Which is not python 3, its actually python 2) Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants