[Python-Dev] Type hints -- a mediocre programmer's reaction (original) (raw)
Harry Percival harry.percival at gmail.com
Mon Apr 20 23:09:18 CEST 2015
- Previous message (by thread): [Python-Dev] Type hints -- a mediocre programmer's reaction
- Next message (by thread): [Python-Dev] Type hints -- a mediocre programmer's reaction
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
So I guess the main difference is that type annotations in stub files wouldn't be available at runtime? Ie, they wouldn't magically appear in annotations (unless the python interpreter itself started to evaluate stub files too)
On 20 April 2015 at 22:02, Guido van Rossum <guido at python.org> wrote:
On Mon, Apr 20, 2015 at 1:50 PM, Harry Percival <harry.percival at gmail.com> wrote:
> stub files are only used to type-check users of a module. If you want a module itself to be type-checked you have to use inline type hints
is this a fundamental limitation, or just the current state of tooling? It's not fundamental, it's just more in line with the original purpose of stubs (to describe C extensions). -- --Guido van Rossum (python.org/~guido)
--
Harry J.W. Percival
Twitter: @hjwp Mobile: +44 (0) 78877 02511 Skype: harry.percival -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150420/60db1f9c/attachment-0001.html>
- Previous message (by thread): [Python-Dev] Type hints -- a mediocre programmer's reaction
- Next message (by thread): [Python-Dev] Type hints -- a mediocre programmer's reaction
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]