Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'static': 0.04; 'url:pipermail': 0.05; 'annotations': 0.09; 'attributes': 0.09; 'editor.': 0.09; 'ide': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'libraries.': 0.16; 'optional': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'language': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'typing': 0.19; 'python?': 0.22; 'header :User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; "doesn't": 0.30; 'returned': 0.30; 'especially': 0.30; "i'm": 0.30; "who'd": 0.31; 'url:python': 0.33; 'could': 0.34; 'editor': 0.35; 'but': 0.35; 'there': 0.35; 'object,': 0.36; 'useful': 0.36; 'url:org': 0.36; 'effort': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'url:mail': 0.40; 'introduced': 0.61; 'new': 0.61; 'show': 0.63; 'information': 0.63; 'more': 0.64; 'lack': 0.78; 'dart': 0.84; 'pain': 0.84; 'you...': 0.96 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: optional types Date: Wed, 29 Oct 2014 17:51:46 +0100 Organization: None References: <99399d4a-902d-42d9-86c8-7bdcd2a766cc@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p57bd8fe3.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414601774 news.xs4all.nl 2978 [2001:888:2000:d::a6]:49841 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79923 Kiuhnm wrote: > I must say that the lack of static types in Python is a pain in the neck > especially when I'm exploring new libraries. Recently, I learned a new > language called Dart which have optional typing and I had a lot of fun > with it. Basically, you use type annotations as documentation and to give > useful information to the IDE or editor. That makes the IDE look *very* > smart! I'm using PyCharm and more often than not I want to see the list of > methods and attributes of an object, but the editor won't show them to me > because it doesn't know the dynamic type of the variable whose value was > just returned by a function. That's irritating! Am I the only one who'd > like to see optional types introduced in Python? Personally I am skeptical, but there is an effort underway: http://www.mypy-lang.org/ https://mail.python.org/pipermail/python-ideas/2014-August/028742.html Nothing that your search engine of choice could not have found you...