by steinsgate on 8/11/16, 8:13 AM with 82 comments
by alanfranzoni on 8/11/16, 10:30 AM
What's a type hint for if, after that, the user can actually pass a different type?
by raverbashing on 8/11/16, 9:40 AM
Extremely frustrated by this decision and even though the multiple denials that it won't become a statically typed language it's clear that idea has changed
by haney on 8/11/16, 6:45 PM
1) I have the ability to define a type that's required so that the function can't be called without a numeric type.
2) I add boiler plate the the top of my function to validate that I'm receiving a number.
3) I forget to do 1 or 2 and I get a runtime error when a different developer inadvertently passes an incorrect type to my function.
by berntb on 8/11/16, 11:08 AM
Most heavily used libraries in most dynamic languages, not only Python, ought to have assertions with type checks for parameters. In the external API calls to the lib.
Inside of a lib you should have tests anyway, so type declarations shouldn't be important.
by toyg on 8/11/16, 10:15 AM
The beauty of python was that it could read like pseudocode; more and more special characters and notations are putting that idea to rest. I guess it's the price to pay for mainstream success -- when banks get involved, everything becomes uber-formal and soul-crushing.
by RodericDay on 8/11/16, 3:56 PM
If people really want their bulky IDEs to give them maximum help when introspecting a codebase, there should just be a TypeScript like superset of Python that those people can use.
This syntax is awful and will seriously cause antagonism in terms of what people consider "pythonic" and "good code".
by rilut on 8/11/16, 10:17 AM
by webjunkie on 8/11/16, 9:44 AM
my_class_attr = ClassAttr[bool]: True
This seems more familiar somehow.by denfromufa on 8/11/16, 11:44 AM
by w8rbt on 8/11/16, 11:30 AM
by super_mario on 8/11/16, 11:44 AM
by crdoconnor on 8/11/16, 9:38 AM