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

Print ... for ellipsis type in type parameters #705

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

yosh-matsuda
Copy link
Contributor

I want to print ... as a parameter of nb::typed, e.g. tuple[int, ...], but using nb::ellipsis shows its type, EllipsisType.

In this PR change, I have changed the type string to ... only when nb::ellipsis is in nb::typed.

Is this acceptable?

include/nanobind/nb_cast.h Outdated Show resolved Hide resolved
@wjakob
Copy link
Owner

wjakob commented Aug 29, 2024

Needs a test.

@yosh-matsuda
Copy link
Contributor Author

Thank you for reviewing. It is fixed, and the test is added.

@wjakob
Copy link
Owner

wjakob commented Aug 29, 2024

Great, thank you!

@wjakob wjakob merged commit 928e3b1 into wjakob:master Aug 29, 2024
24 checks passed
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