Skip to content

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

Closed
gvanrossum wants to merge 26 commits into
python:mainfrom
gvanrossum:super-is-macro
Closed

GH-98831: Get rid of super(), just use macro()#100095
gvanrossum wants to merge 26 commits into
python:mainfrom
gvanrossum:super-is-macro

Conversation

@gvanrossum

@gvanrossumgvanrossum commented Dec 8, 2022

Copy link
Copy Markdown
Member

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

netlifyBot commented Dec 8, 2022

Copy link
Copy Markdown

Deploy Preview for python-cpython-preview ready!

NameLink
🔨 Latest commit248ecfe
🔍 Latest deploy loghttps://app.netlify.com/sites/python-cpython-preview/deploys/63912b17d4612d0009b1995a
😎 Deploy Previewhttps://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
Copy Markdown
MemberAuthor

Closing in favor of #100124.

@gvanrossum
gvanrossum deleted the super-is-macro branch December 8, 2022 23:45
Sign up for freeto 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

@gvanrossum@bedevere-bot