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

GH-98831: Get rid of super(), just use macro() #100095

Closed
wants to merge 26 commits into from

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Dec 8, 2022

Instead of super(X) = Y + Z write macro(X) = Y + JOIN + Z and get rid of the code duplication for super and macro.

This doesn't really make things much cleaner, but it works.
This was more convoluted than I expected.
Also removed some dead code from the former
(somehow the case for CacheEffect had crept back in).
This makes the PEEK/POKE sequences less jarring.
STORE_SUBSCR was alread half converted,
but wasn't using cache effects yet.
The original had mysterious `SET_TOP(NULL)` before `goto error`.
I assume those just account for `obj` having been decref'ed,
so I got rid of them in favor of the cleanup implied by `ERROR_IF()`.
This should fix the build crash on Windows.
@netlify
Copy link

netlify bot commented Dec 8, 2022

Deploy Preview for python-cpython-preview ready!

Name Link
🔨 Latest commit 248ecfe
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/63912b17d4612d0009b1995a
😎 Deploy Preview https://deploy-preview-100095--python-cpython-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@gvanrossum
Copy link
Member Author

Closing in favor of #100124.

@gvanrossum gvanrossum closed this Dec 8, 2022
@gvanrossum gvanrossum deleted the super-is-macro branch December 8, 2022 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants