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

Annotating Array, Set and Dictionaries (attributes & parameters) (native subclassing) #683

Closed
Kiruse opened this issue Feb 28, 2019 · 1 comment

Comments

@Kiruse
Copy link

Kiruse commented Feb 28, 2019

When using native subclassing API, the docs demonstrate how to create a float array property, but there is no talk of TDictionaries or TSets. Are those possible yet?

Furthermore I have not been able to create a function which takes an array either. I tried list, list(str) and [str], but list isn't supported altogether (missing __args__ attribute) and [str] cannot be parsed (leaving the parameter ignored). Is this not possible yet?

@dfb
Copy link
Contributor

dfb commented Mar 3, 2019

For the function param stuff, see PR #635 for an unofficial patch that adds support for it. Unsupported, but we've been using it in our project for awhile and it's worked well for us. With the patch you can have e.g.:

def Foo(stuff : [str]) -> [bool]:
     ...

for a function that takes an array of strings and returns an array of bools.

@Kiruse Kiruse closed this as completed Oct 11, 2023
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

No branches or pull requests

2 participants