First time here? Check out the FAQ!
2

Type Hinting

Does Wing Ide Pro 6.1.1-1 support type hinting. Like if return type is none for function and function is assigned to a variable Wing can catch.

N Vim's avatar
21
N Vim
asked 2018-10-13 00:44:00 -0600
Wingware Support's avatar
4.2k
Wingware Support
updated 2019-03-13 10:23:13 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

Wing tries to infer types on its own so if a function contains 'return ""' it should know that variables assigned the return value of that function are strings (possibly among other types).

You can also use various different methods for type hinting, including PEP 484 and PEP 526 type hinting or adding isinstance() assertions.  The details are described in https://wingware.com/doc/edit/helping...

Wingware Support's avatar
4.2k
Wingware Support
answered 2018-10-13 11:55:00 -0600
Wingware Admin's avatar
231
Wingware Admin
updated 2019-03-06 22:38:20 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer