Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'static': 0.04; 'syntax': 0.04; 'argument': 0.05; 'subject:Python': 0.06; 'annotations': 0.09; 'parameter': 0.09; 'pep': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; '7:58': 0.16; 'docstrings': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'simple.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'library,': 0.24; 'cc:2**0': 0.24; 'equivalent': 0.26; 'purposes': 0.26; 'header:In- Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'routing,': 0.31; 'up.': 0.33; 'everyone': 0.33; "can't": 0.35; 'something': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'expected': 0.38; 'skip:o 20': 0.38; "you're": 0.61; 'kind': 0.63; 'nobody': 0.68; 'subject:! ': 0.74; '(probably': 0.84; '2015': 0.84; '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=QDhjCdMn7R5HiBKJpJuRZNYagZ8ZtHdfI8KuSUChD2o=; b=W6SQ6VU3PUn5WcMjgOIqjJRZhKVXLmVfnoOW3Eip/t1/DV3vqGN2GLW0iPHC8CYC7X QxE0VNV5UA0LvhmcmRM16K7wrs3EdvlY61VS1v+DAnIzEKhL2qZxkPqGWdOVtn5vwAp1 QfyBsdeSBpYomzpP5uzzBjbcyBHNL2oxr4x8eJNYQEprE5dUMIJC27hY8AIrTyl/T/Az Z8m3fG3S7RQmvNcjuzEvBBUAkKyLpqhMsT0KWRDcIiz5SgQte1VyoC2MQv9wikuDsBpc intmIpv09IbFZiOhnlaQAjMKgC0ki1SsrPDYUa/ofzBWhQXwOQVWsPiXQfDxZUKAbfLo SZ+w== MIME-Version: 1.0 X-Received: by 10.42.95.12 with SMTP id d12mr133189icn.12.1422392923274; Tue, 27 Jan 2015 13:08:43 -0800 (PST) In-Reply-To: References: <54c07d04$0$13012$c3e8da3$5496439d@news.astraweb.com> <1939680766443642112.878725sturla.molden-gmail.com@news.gmane.org> <6eb91c4b-92ff-44a8-b5a9-6ef04c71f4cb@googlegroups.com> <35a40ec6-3763-448b-9ea4-4a233a04979b@googlegroups.com> <54c1ccc8$0$13005$c3e8da3$5496439d@news.astraweb.com> <54c6d7c2$0$12992$c3e8da3$5496439d@news.astraweb.com> Date: Wed, 28 Jan 2015 08:08:43 +1100 Subject: Re: Python is DOOMED! Again! 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422392925 news.xs4all.nl 2955 [2001:888:2000:d::a6]:41022 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84671 On Wed, Jan 28, 2015 at 7:58 AM, Mario Figueiredo wrote: > Looking at PEP 3107, i'm left wondering: what if I have for instance > already annotated my functions for parameter marshalling, following the > syntax expected of that specific library, and now I want to annotate > them for type hinting for the purposes of static analysis? This is the kind of argument that keeps on coming up. Everyone has a "What if" scenario about function annotations... and almost nobody actually has a codebase that uses them. It's equivalent to asking: "What if I already used docstrings to control URL routing, and now I want to use them for function documentation?". Well, simple. You move your other-use-of-annotations out to something else (probably a decorator) before you add type hints. Until that time, you're welcome to continue using annotations for something other than type hinting; you just can't do both at once on the same function. ChrisA