Re:PyPy gets funding from Mozilla for Python 3.5 support
by catdog on Tuesday August 09, 2016 @07:10PM
(#12258337)
It's not only optional, it does nothing by default. What was introduced into python is a standardized way to do type annotations. It consists mostly of a new standard library module and as far as i know it doesn't even introduce changes to the language as it uses comments, additional files and the rarely used function annotations. The interpreter happily ignores them anyways but external tools like mypy don't have to invent their own incompatible syntax.
[ Parent
| on HN ]
Re:PyPy gets funding from Mozilla for Python 3.5 support
by twblalock on Tuesday August 09, 2016 @08:36PM
(#12258706)
I was more excited about them when I believed they were actually enforced. I guess they help with static analysis in IDEs, but you can still get type errors at runtime, so Python is still missing out on the main advantage of static typing.
Re:PyPy gets funding from Mozilla for Python 3.5 support
by hendzen on Tuesday August 09, 2016 @09:04PM
(#12258804)
there is a type checker available: http://mypy-lang.org/
Re:PyPy gets funding from Mozilla for Python 3.5 support
by viraptor on Tuesday August 09, 2016 @09:10PM
(#12258824)
> as far as i know it doesn't even introduce changes to the language as it uses comments
That's not the case. See for example https://www.python.org/dev/peps/pep-0484/#type-definition-sy...