Skip to content

[mypyc] Support isinstance with librt.vecs.vec objects#20699

Merged
JukkaL merged 2 commits intomasterfrom
mypyc-vec-isinstance
Jan 30, 2026
Merged

[mypyc] Support isinstance with librt.vecs.vec objects#20699
JukkaL merged 2 commits intomasterfrom
mypyc-vec-isinstance

Conversation

@JukkaL
Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL commented Jan 30, 2026

Use a common base class 'vec' for isinstance support. The base class is currently only used for isinstance, but we could add some other common functionality there in the future.

I used some coding agent assist.

Use a common base class 'vec' for isinstance support. The base class
is currently only used for isinstance, but we could add some other
common functionality there in the future.

Used coding agent assist some.
v = vec[t]()
assert isinstance(v, vec)
assert not isinstance("x", vec)
assert not isinstance(vec[t], vec)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this one inside the loop?

@JukkaL JukkaL merged commit 09283a7 into master Jan 30, 2026
16 checks passed
@JukkaL JukkaL deleted the mypyc-vec-isinstance branch January 30, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants