Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!newsreader4.netcologne.de!news.netcologne.de!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'programmer': 0.03; 'syntax': 0.04; 'subject:Python': 0.06; '"""': 0.07; 'parameter': 0.09; 'python': 0.11; 'itself.': 0.14; 'docstring': 0.16; 'int)': 0.16; 'marco': 0.16; 'nevertheless': 0.16; 'syntax,': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'affects': 0.24; 'header:In-Reply-To:1': 0.27; 'code': 0.31; 'idea,': 0.31; 'phone:': 0.31; 'not.': 0.33; 'received:google.com': 0.35; 'list': 0.37; 'problems': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'first': 0.61; 'information': 0.63; 'charset:windows-1252': 0.65; 'header:Reply- To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'subject:Solution': 0.84; 'subject:Proposal': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=BnHacpyl8GlogCV0t5QsUJTIv942JKPWwmAnNtAWWBA=; b=YawTqRUWrrdChYPLp9XFhiUf7F/ymN2S9Nmh8IC/M/lG7UQlWvW1yJm7Sj6yBOhFUL VxacWqGCeA2ZiY6sGkl9CS7ZkLfrNiIUbeeuY4hoRd5uFU6ey7oCPSZkbeD/L4SO+gyo 7ENUMCa6ID0NvKWBIFEdU6IOE+NuNoE7YxyGlZH88/d1E8tM9V1kowz7J4DMzThARK02 X72s/dkcQf8Inc31f/jttVsJkDLC1EjNS6adsj+wlbcX0U56+YZ7ad61CvsaTjMpfVFq 7w4ns5CbnpDHnQkeP5S+5pjcl4BtM9Auvn7TAHkEBxFE/fFDZzVGfEpJ04OBNVH2WLhi Tn5w== X-Received: by 10.180.206.79 with SMTP id lm15mr14144424wic.67.1422109538375; Sat, 24 Jan 2015 06:25:38 -0800 (PST) From: Marco Buttu X-Google-Original-From: Marco Buttu Date: Sat, 24 Jan 2015 15:25:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python Sanity Proposal: Type Hinting Solution References: <6da1eb58-a0bb-4d37-8293-0a8cafe6a89c@googlegroups.com> <5afad59b-5e8c-4821-85cf-9e971c8c7be6@googlegroups.com> <4b3b498a-c9b0-443d-8514-87ccd8e98f43@googlegroups.com> <54c39e48$0$12996$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 26 Jan 2015 09:15:18 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: mbuttu@oa-cagliari.inaf.it 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422260120 news.xs4all.nl 2849 [2001:888:2000:d::a6]:53602 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84594 On 24/01/2015 15:09, Mario Figueiredo wrote: >> >def myfunction(arg1, arg2): >> > """ >> > Normal docstring. >> > @typehint: (str, int) -> bool""" >> > return True >> > >> >One of the problems with this is that it put the information about >> >parameters far away from the parameter list itself. > Then move it to the first line of the docstring... I like this idea, because nevertheless the type hinting is optional, the mypy syntax affects every Python programmer who has to read other code that will use this syntax, while the docstring one does not. -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbuttu@oa-cagliari.inaf.it