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

(python) is a type limited #503

Open
briot opened this issue May 25, 2020 · 1 comment
Open

(python) is a type limited #503

briot opened this issue May 25, 2020 · 1 comment

Comments

@briot
Copy link

briot commented May 25, 2020

Hi guys,
I am trying to find out whether a given type is limited. This might be because its public via has a "limited" keyword, or its private view, or perhaps it is derived from a limited type (but itself doesn't explicitly has a limited keyword). It might also be implicitly limited in the case of a record with a field of a limited type.

The documentation doesn't seem to point to any such function. TypeDef have a f_has_limited, but that's only for the keyword itself. So I could go up the parent tree, or looking at each field of a record, but I wonder whether there is already such a built-in function, at least in python ?

Thanks

@raph-amiard
Copy link
Member

raph-amiard commented Jun 2, 2020

Hello Manu! Hope you're well, sorry for lagging to answer.

We don't have such a property for the moment, mostly because this is not something needed when you don't do compilation, but it's clearly a property that we'd want to add.

It's a bit complex so we won't do it by tomorrow, but we'll put it on our workpile and keep you updated 🙂

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

No branches or pull requests

2 participants