Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.06; 'fix.': 0.09; 'occasionally': 0.09; 'runs': 0.10; 'cc:addr:python- list': 0.11; 'jan': 0.12; 'useful,': 0.14; '23,': 0.16; 'brilliant': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'reedy': 0.16; 'sync': 0.16; 'wrote:': 0.18; 'code.': 0.18; '(the': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; "aren't": 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'related': 0.29; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; 'option': 0.32; 'run': 0.32; 'another': 0.32; 'fri,': 0.33; 'tool': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'files': 0.38; 'pm,': 0.38; 'called': 0.40; 'solve': 0.60; 'break': 0.61; 'new': 0.61; "you'll": 0.62; 'worth': 0.66; 'between': 0.67; '2015': 0.84; 'proposal.': 0.84; 'subject:Solution': 0.84; 'increases': 0.91; 'subject:Proposal': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=KrZexsAwqhRGAc9XwQUkFIIDJHJK1uS1OtVbjODOVqg=; b=vmB05X0QjkoGOyu63S6CH90lDLZtbYYtLM1KqEyU8vz/I0ueEOKaMn/taSkXWMc+/I 1AW3HCT0b4YpzbR+F2ucOx+kzlCTAWb4EUtUXlH09b+7Yk+9cDMjg9bzoLhN5wqOLTP8 iFLjChl9LrkYkgdheBoSCw5SRaD2s8bDnOwUSQ41ewINEQ3FfeYQkGMJ+DV7sAoAqNeS BbDktRiQ1WmlNCg/YN28M5dG5BDsKkeFEELPUiHfFmTlwaP+XccMCYAyvshJ2NQTNHfc 7mJpIRXnw6bVVZexf7mx2GniLgee4knnrgUiYCZFQ87ZnWj2w1/hKrBmpydJBL1DGUMF 4oyw== MIME-Version: 1.0 X-Received: by 10.50.142.99 with SMTP id rv3mr17096625igb.11.1421985540214; Thu, 22 Jan 2015 19:59:00 -0800 (PST) In-Reply-To: References: <6da1eb58-a0bb-4d37-8293-0a8cafe6a89c@googlegroups.com> Date: Fri, 23 Jan 2015 14:59:00 +1100 Subject: Re: Python Sanity Proposal: Type Hinting Solution From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421985858 news.xs4all.nl 2894 [2001:888:2000:d::a6]:39749 X-Complaints-To: abuse@xs4all.nl X-Received-Body-CRC: 1302556878 X-Received-Bytes: 4140 Xref: csiph.com comp.lang.python:84312 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. 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. Unless you make a git/hg hook that runs type checks, chances are you'll have those issues in your code. Stub files are useful, but they aren't going to magically solve everyone's complaints. ChrisA