Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'tutorial': 0.03; 'static': 0.04; 'dynamically': 0.07; 'freedom,': 0.09; 'received:67.192': 0.09; 'received:67.192.241': 0.09; 'received:dfw.emailsrvr.com': 0.09; 'typed': 0.09; 'python': 0.11; 'times,': 0.14; 'enlighten': 0.16; 'pythonic': 0.16; 'stepping': 0.16; 'stumbled': 0.16; 'flexibility': 0.16; 'language': 0.16; 'wrote:': 0.18; 'typing': 0.19; 'header:User-Agent:1': 0.23; 'received:emailsrvr.com': 0.24; 'url:moin': 0.24; "i've": 0.25; 'received:(smtp server)': 0.26; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; '(like': 0.30; 'strongly': 0.30; 'comments': 0.31; 'url:wiki': 0.31; 'gary': 0.31; 'anyone': 0.31; 'url:python': 0.33; 'but': 0.35; 'there': 0.35; 'thanks': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'half': 0.37; 'searching': 0.37; 'step': 0.37; 'implement': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'url:%20': 0.61; 'power': 0.76; 'bite': 0.84; 'confusing': 0.84; 'embrace': 0.84 X-Virus-Scanned: OK Date: Mon, 05 Aug 2013 14:07:42 -0700 From: Gary Herron User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Newbie: static typing? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375737396 news.xs4all.nl 15863 [2001:888:2000:d::a6]:34086 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51979 On 08/05/2013 01:46 PM, Rui Maciel wrote: > Is there any pythonic way to perform static typing? After searching the web > I've stumbled on a significant number of comments that appear to cover > static typing as a proof of concept , but in the process I've found no > tutorial on how to implement it. > > Does anyone care to enlighten a newbie? > > > Thanks in advance, > Rui Maciel The Pythonic way is to *enjoy* the freedom and flexibility and power of dynamic typing. If you are stepping out of a static typing language into Python, don't step just half way. Embrace dynamic typing. (Like any freedom, it can bite you at times, but that's no reason to hobble Python with static typing.) Python is both dynamically typed and strongly typed. If you are confusing dynamic/static typing with week/strong typing, see http://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language Gary Herron