[Python-Dev] Type hints -- a mediocre programmer's reaction
Terry Reedy
tjreedy at udel.edu
Tue Apr 21 08:13:55 CEST 2015
On 4/20/2015 9:07 PM, Chris Angelico wrote:
> On Tue, Apr 21, 2015 at 10:52 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
>> Jack is not complaining only about *writing* code. He's complaining
>> about the effect this will have on code that we all are expected to
>> *read*.
For reading, good function and parameter names and a good summary as the
first line of the docstring are probably more useful *to humans* than
formal type annotations.
> Ahh. Yes, that's a concern. When you go digging into that library to
> find out how it works, yes, you'd be face-to-face with their type
> annotations.
> Maybe it'd be of value to have a quick "code stripper" that takes away
> all the annotations,
I was already thinking about that for Idle. The file should then be
either semi read-only or renamed. Also options to merge annotations in
from stub files for editing and to split back out when writing.
> plus any other junk/framing that you're not
> interested in, and gives you something you can browse in a text
> editor? It could take away all the Sphinx adornments from docstrings,
> any source control versioning markers, all that kind of thing.
Interesting idea.
--
Terry Jan Reedy
More information about the Python-Dev
mailing list