[Python-Dev] Type hints -- a mediocre programmer's reaction (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Tue Apr 21 03:30:01 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 ]
On 20 Apr 2015 14:44, "Barry Warsaw" <barry at python.org> wrote:
On Apr 20, 2015, at 07:30 PM, Harry Percival wrote: >tldr; type hints in python source are scary. Would reserving them for stub >files be better? I think so. I think PEP 8 should require stub files for stdlib modules and strongly encourage them for 3rd party code.
+1
Having stub files take precedence over inline annotations would also neatly deal with the annotation compatibility problem (you can use a stub file to annotate code using annotations for another purpose).
Another point in favour of that approach: stub files could be evaluated holistically rather than statement at a time, permitting implicit forward references.
Cheers, Nick.
Cheers, -Barry
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150420/4806f578/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 ]