Skip to content

gh-146587: fix type slot assignment incase of multiple slots for same name#146593

Open
kumaraditya303 wants to merge 4 commits intopython:mainfrom
kumaraditya303:fix-gh-146587
Open

gh-146587: fix type slot assignment incase of multiple slots for same name#146593
kumaraditya303 wants to merge 4 commits intopython:mainfrom
kumaraditya303:fix-gh-146587

Conversation

@kumaraditya303
Copy link
Copy Markdown
Contributor

@kumaraditya303 kumaraditya303 commented Mar 29, 2026

@kumaraditya303 kumaraditya303 changed the title gh-146587: add fix type slot assignment incase of multiple slots for same name gh-146587: fix type slot assignment incase of multiple slots for same name Mar 29, 2026
@kumaraditya303 kumaraditya303 added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Mar 29, 2026
@kumaraditya303 kumaraditya303 requested a review from vstinner March 29, 2026 11:43
@sergey-miryanov
Copy link
Copy Markdown
Contributor

@kumaraditya303 Could you please take a look at sergey-miryanov@f26545a? WDYT?

@kumaraditya303
Copy link
Copy Markdown
Contributor Author

kumaraditya303 commented Mar 29, 2026

Could you please take a look at sergey-miryanov@f26545a? WDYT?

It looks the same as this one except more complicated, you are also checking that if a slot has duplicates then only one of them should be filled isn't it?

I am not sure that the loop is big enough that there would be performance difference.

@sergey-miryanov
Copy link
Copy Markdown
Contributor

Yeah, it looks the same. Except we don’t need to iterate all slotdefs, because we precalculates dup indexes.

@sergey-miryanov
Copy link
Copy Markdown
Contributor

sergey-miryanov commented Mar 29, 2026

I wrote answer before your edit.

I don’t remember exactly how items in slotdefs, about 70 maybe 94 (edited). For dups we need iterate 2 or 3 items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review interpreter-core (Objects, Python, Grammar, and Parser dirs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants