-
Notifications
You must be signed in to change notification settings - Fork 13
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
Type annotations #75
Comments
you indeed can use type notation in py2. |
Thanks for the input. I think I was meaning syntax supported annotations such as: def sum(a: int, b: int) -> int:
return a + b To my knowledge this is only supported in 3.5, and the |
I think you need to install typing package by yourself in py2. https://pypi.python.org/pypi/typing/3.5.2 Hai
|
I understand it's fully backported, and uses the same name space. |
Currently, we use the 'legacy' google style docstrings to specify type annotations. Python 3.5 supports type annotations, but Python 2 doesn't. Too many cheminformaticians still use Python 2 to drop support yet (although I would like to asap!).
We could create .pyi files, which state the type annotations in a separate file, as a stop gap until we can drop Python 2 support, or just keep using the 'legacy' versions.
Personally, I think this keeping the legacy style would waste the least amount of time, although I am very keen to bring in type annotations.
The text was updated successfully, but these errors were encountered: