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

Guido van Rossum guido at python.org
Thu Jan 22 05:47:44 CET 2015


On Wed, Jan 21, 2015 at 8:39 PM, Eugene Toder <eltoder at gmail.com> wrote:

> On Wed, Jan 21, 2015 at 8:25 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>
> wrote:
>
>> On 01/22/2015 01:50 PM, Guido van Rossum wrote:
>>
>>> I've seen plenty of code that takes instances a certain class
>>> as argument and calls methods of that type but never constructs a new
>>> instance
>>> nor does any of the other things for which you need the class name,
>>>
>>
>> If the only thing the name is needed for is static checking,
>> I don't see what's so bad about not finding out until you
>> actually run the static check. Adding those imports earlier
>> doesn't make the code work any better or show up any more
>> runtime bugs.
>
>

>
> Also, if static type checking succeeds, it will be integrated into many
> IDEs/editors, so you will see type checker errors even before you get to
> run the tests.
>

So I think we're all agreed that the current proposal is fine!

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150121/d9f1774e/attachment.html>


More information about the Python-ideas mailing list