Skip to content

[New Lecture] Python Static Typing #343

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

Open
mmcky opened this issue May 16, 2025 · 0 comments
Open

[New Lecture] Python Static Typing #343

mmcky opened this issue May 16, 2025 · 0 comments

Comments

@mmcky
Copy link
Contributor

mmcky commented May 16, 2025

It would be good to add a new lecture on python type hints syntax.

It has a number of good applications including:

  1. improving efficiency of JIT compilers
  2. useful in software design projects to better record interface types for methods and functions
  3. LLM's are now returning code with type hints, so teaching it will reduce confusion for new programmers
  4. help to catch errors (in some IDE's) and using software like pyrefly

Some notes when preparing the lecture

numba: to date Numba doesn't make use of them -- instead you still need to use the Numba decorator to declare types for JIT compilation.

jax: here is the roadmap for python type hints for the jax project


It could be either a new lecture, or as a new section in https://python-programming.quantecon.org/python_advanced_features.html


Things to check out:

  1. pyrefly
  2. warp kernel
  3. https://www.reddit.com/r/nvidia/comments/1jrfjkl/nvidia_adds_native_python_support_to_cuda/
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

1 participant