[Python-ideas] PEP 484 (Type Hints) -- first draft round

Devin Jeanpierre jeanpierreda at gmail.com
Tue Jan 20 23:57:48 CET 2015


On Tue, Jan 20, 2015 at 3:06 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Tue, Jan 20, 2015 at 07:59:40PM +1300, Greg Ewing wrote:
>> Stephen Hansen wrote:
>> > Then you have decorators and
>> >... whatever you call that line? What's the difference?
>>
>> The difference is that the :: annotations would *not* be
>> evaluated a run time. There's currently no way to get
>> that with a decorator, or anything else in the language,
>> short of abusing comments or string literals.
>> Yet it's what you really want for static type checking.
>
> Then I guess Python won't have static type checking.
>
> I think Guido has been very clear that he has little interest at this
> stage (if ever) about introducing a Java/Pascal/Haskell style statically
> typed compiler to Python.

Fortunately, Greg wasn't suggesting that. You seem to be
misunderstanding the phrase "static type checker". It means something
that checks types, statically. Like mypy. Greg's complaints make sense
in that context (and I agree with him.)

-- Devin


More information about the Python-ideas mailing list