Hacker News new | past | comments | ask | show | jobs | submit login

Unfortunately PEP 563 [1] means that any non-type-hint usage of annotations is considered deprecated. You could still do things with decorators (like mentioned in a sibling comment), although I suppose that doesn't offer such an elegant syntax.

[1]: https://www.python.org/dev/peps/pep-0563/#non-typing-usage-o...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: