-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Support for python 3.6 syntax (Static Type Checking) #3727
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
Comments
MicroPython does support type hints for the function arguments, and for variables and instance properties you can use the comment syntax: As for possible run-time costs of |
Is it hint or compile time error?
W dniu śr., 18.04.2018 o 15:34 Jan Pochyla <notifications@github.com>
napisał(a):
MicroPython does support type hints for the function arguments, for
variables and instance properties you can use the comment syntax: # type:
....
As for possible run-time costs of import typing and such, I've ended up
wrapping it in if __debug__: clauses.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3727 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABdQ6lcmdDoskJzVURXMXJHuKBHKellwks5tp0DVgaJpZM4TYf_A>
.
--
Przemek
|
The compiler itself doesn't care about these type hints. You need to run an external tool (eg mypy) to find the type errors. The addition of this particular syntax feature (PEP 526 - Syntax for Variable Annotations) is discussed in #2415, which also discusses other 3.6 changes. I'll close this issue for now. |
esp32s2: Do a full scan when channel/BSSID are not given
Would be super cool to use Static Type Checking from the beginning as this may help a lot
https://medium.com/@ageitgey/learn-how-to-use-static-type-checking-in-python-3-6-in-10-minutes-12c86d72677b
The text was updated successfully, but these errors were encountered: