WingNews logo WingNews
top | new | best | ask | show | jobs
top | item 34617461

(no title)

VygmraMGVl | 3 years ago

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-...

discuss

order

abdullahkhalids|3 years ago

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.
powered by hn/api // news.ycombinator.com