[Python-Dev] Type hints -- a mediocre programmer's reaction
Cory Benfield
cory at lukasa.co.uk
Wed Apr 22 13:13:55 CEST 2015
On 21 April 2015 at 18:12, Steven D'Aprano <steve at pearwood.info> wrote:
> I expect that dealing with duck typing will be very high on the list
> of priorities for the future. In the meantime, for this specific use-case,
> you're probably not going to be able to statically check this type hint.
> Your choices would be:
>
> - don't type check anything;
To be clear, for the moment this is what requests will do, unless the
other maintainers strongly disagree with me (they don't). I am quite
convinced that PEP 484 is insufficiently powerful to make it
worthwhile for requests to provide 'official' type hints.
I suspect someone will provide hints to typeshed, and I certainly hope
they're good, because if they're bad we'll definitely field bug
reports about them (more on this in a different thread I think).
More information about the Python-Dev
mailing list