Re: [Tutor] Function annotations

2017-02-06 Thread George Fischhof
2017-02-05 9:36 GMT+01:00 Steven D'Aprano : > On Sat, Feb 04, 2017 at 10:11:39PM -0600, boB Stepp wrote: > > > Are the people making linters implementing checking function > > annotations? Or is this something only gradually being adopted? > > Depends which linter :-) > > MyPy is still the refere

Re: [Tutor] Function annotations

2017-02-05 Thread Steven D'Aprano
On Sat, Feb 04, 2017 at 10:11:39PM -0600, boB Stepp wrote: > Are the people making linters implementing checking function > annotations? Or is this something only gradually being adopted? Depends which linter :-) MyPy is still the reference implementation for type hinting in Python: http://myp

Re: [Tutor] Function annotations

2017-02-04 Thread boB Stepp
On Sat, Feb 4, 2017 at 9:23 PM, Steven D'Aprano wrote: > On Sat, Feb 04, 2017 at 08:50:00PM -0600, boB Stepp wrote: >> Of course, these are >> apparently optional. I now wonder if I should be endeavoring to add >> these to my code? > > Do you run a linter? If not, there doesn't seem much point i

Re: [Tutor] Function annotations

2017-02-04 Thread Steven D'Aprano
On Sat, Feb 04, 2017 at 08:50:00PM -0600, boB Stepp wrote: > I just finished looking at > https://docs.python.org/3/tutorial/controlflow.html#function-annotations > and skimming through PEP 484--Type Hints > (https://www.python.org/dev/peps/pep-0484/). My initial impression is > that the purpose o

[Tutor] Function annotations

2017-02-04 Thread boB Stepp
I just finished looking at https://docs.python.org/3/tutorial/controlflow.html#function-annotations and skimming through PEP 484--Type Hints (https://www.python.org/dev/peps/pep-0484/). My initial impression is that the purpose of function annotations is to enable static code analysis tools like l