-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
re match.group should support __index__ #71364
Comments
|
This looks as new feature and can go only in 3.6. |
I would still argue that it's a bug. The intention of PEP-357 is that __index__ should be used whenever some object needs to be converted to a Py_ssize_t, which is exactly what you do here. |
It would be a bug if it was supported but gave the wrong result. It has never been supported (the re module predates PEP-357), so it's a new feature. |
Attach a patch to add this feature to Py3.6. |
What is the use case? |
My use case is SageMath: http://trac.sagemath.org/ticket/20750 |
Interesting. This is very unusual but reasonable use case. |
New changeset 0303ab246152 by Serhiy Storchaka in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: