Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
VygmraMGVl
on Feb 1, 2023
|
parent
|
context
|
favorite
| on:
Python's “disappointing” superpowers
You can declare a type-hint beforehand without setting the value of the variable. See:
https://peps.python.org/pep-0526/#global-and-local-variable-...
abdullahkhalids
on Feb 1, 2023
[–]
Yes, but then those variables are not visible when we dir(object), which makes it harder for the user to prototype. Certainly, type hinting should not get in the way of the users.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: