Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.06; 'fix.': 0.09; 'occasionally': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.12; '10:59': 0.16; '23,': 0.16; 'brilliant': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'sync': 0.16; 'wrote:': 0.18; '(the': 0.22; 'putting': 0.22; 'separate': 0.22; 'tests': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'file.': 0.24; 'pass': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'chris': 0.29; 'related': 0.29; 'especially': 0.30; 'probably': 0.32; 'option': 0.32; 'run': 0.32; 'another': 0.32; 'fri,': 0.33; 'could': 0.34; 'tool': 0.35; 'something': 0.35; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'break': 0.61; 'new': 0.61; 'more': 0.64; 'worth': 0.66; 'between': 0.67; '2015': 0.84; 'proposal.': 0.84; 'received:fios.verizon.net': 0.84; 'subject:Solution': 0.84; 'increases': 0.91; 'subject:Proposal': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Python Sanity Proposal: Type Hinting Solution Date: Fri, 23 Jan 2015 00:03:26 -0500 References: <6da1eb58-a0bb-4d37-8293-0a8cafe6a89c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-108-16-203-145.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421989508 news.xs4all.nl 2955 [2001:888:2000:d::a6]:54585 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84315 On 1/22/2015 10:59 PM, Chris Angelico wrote: > On Fri, Jan 23, 2015 at 2:22 PM, Terry Reedy wrote: >> This idea is so brilliant that it is already an option in mypy and is part >> of the new type-hint proposal. The separate type-hint files are called >> 'stub files'. > > It's worth pointing out, too, that the idea isn't panaceaic - it's > just another tool in the box. Any time you break related things into > separate places, especially separate files, the tendency for them to > get out of sync grows dramatically. The same could be said of putting tests in a separate file. > Use of stub files for something > that's only occasionally run (the type-checking linter) increases the > potential time delay between the error and the fix. Projects that view type-checks as tests that must pass will probably run them much more often. -- Terry Jan Reedy