Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Thomas Heller Newsgroups: comp.lang.python Subject: Re: Best practices to overcome python's dynamic data type nature Date: Fri, 14 Feb 2014 20:50:15 +0100 Lines: 18 Message-ID: References: <5fd7e804-820e-4fe1-b36b-67e553f3aedf@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net +PQ/XDYnzJR1TcIsFqptcQN3haqH+cU1enTEM2FVUdod6vZdM= Cancel-Lock: sha1:OJZJXdkEfW6KtOGsuv2kGt/QpTs= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: Xref: csiph.com comp.lang.python:66318 Am 14.02.2014 17:32, schrieb Ethan Furman: > On 02/14/2014 08:10 AM, Sam wrote: >> >> Dynamic data type has pros and cons. It is easier to program but >> also easier to create bugs. What are the best practices to reduce >> bugs caused by Python's dynamic data-type characteristic? Can the >> experienced Python programmers here advise? > > Unit tests. Lint-like tools - there are a few - also help to discover bugs, even before running or testing the code. They also help in other ways to write better code. Myself I use the 'frosted' tool. Thomas