Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'python.': 0.02; ';-)': 0.03; 'debugging': 0.07; 'dan': 0.09; 'cc:addr:python-list': 0.11; 'bug': 0.12; 'language.': 0.14; 'ah,': 0.16; 'c/c++.': 0.16; 'cc:name:python list': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'seems': 0.21; 'programming': 0.22; 'portion': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'subject:problem': 0.24; 'cc:2**0': 0.24; "i've": 0.25; '>': 0.26; 'least': 0.26; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'yes.': 0.31; 'run': 0.32; 'quite': 0.32; 'subject:with': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'being': 0.38; 'jason': 0.38; 'pm,': 0.38; 'days': 0.60; 'skip:u 10': 0.60; 'subject:"': 0.60; 'back': 0.62; "you've": 0.63; 'term': 0.63; 'field': 0.63; 'our': 0.64; 'subject:The': 0.64; 'more': 0.64; 'due': 0.66; 'believe': 0.68; ':).': 0.84; 'disappears': 0.84; '2013': 0.98 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:to :cc:content-type; bh=dzBSGRhtu8ek+guRyBQt4iBwqrsDTQLix5+/Cs4zGnQ=; b=WY97q8ibXlt0IxNtDGAPz59tJoPYo8vDMB/dAXRwCvYWd7SqET+UVmi8TWcLDXHVzp JZgTjjVfcYiG/IxpN6JmE7QqPKu3DZSLXkA8oZ5nP0VHJzO5JFwFqTvmj4dveWfMvFk2 EW9nptVRrfquWd0gUe/p5JWK5dn3ZQvpNNBgd3W9ntQg7Fy/oL4W7cqCcijLGYsS67J6 F0FKGSugre37ctSRzn2NT/KW2bSNS4qz8OTcio8Tc4TjvFMF5o2mB70v7hJFmI9dozjo 2ZTFtzc2WgfzmJ3XuPOrD69MnMP5NFzglC60Fw3pkxswKKbszMNW99GC9rYPtGd95PCM DraA== MIME-Version: 1.0 X-Received: by 10.194.123.9 with SMTP id lw9mr16996135wjb.24.1370229822293; Sun, 02 Jun 2013 20:23:42 -0700 (PDT) In-Reply-To: References: <687dea63-84da-4c45-9366-cb5a10665d1f@googlegroups.com> Date: Sun, 2 Jun 2013 23:23:42 -0400 Subject: Re: PyWart: The problem with "print" From: Jason Swails To: Dan Sommers Content-Type: multipart/alternative; boundary=089e01228514d18ca404de377dd4 Cc: python list 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: 76 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370229823 news.xs4all.nl 15911 [2001:888:2000:d::a6]:60751 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46758 --089e01228514d18ca404de377dd4 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Jun 2, 2013 at 11:10 PM, Dan Sommers wrote: > On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote: > > > ... If you don't believe me, you've never hit a bug that 'magically' > > disappears when you add a debugging print statement ;-). > > Ah, yes. The Heisenbug. ;-) > Indeed. Being in the field of computational chemistry/physics, I was almost happy to have found one just to say I was hunting a Heisenbug. It seems to be a term geared more toward the physics-oriented programming crowd. > We used to run into those back in the days of C and assembly langua > > ge. > > They're much harder to see in the wild with Python. > > Yea, I've only run into Heisenbugs with Fortran or C/C++. Every time I've seen one it's been due to an uninitialized variable somewhere -- something valgrind is quite good at pinpointing. (And yes, a good portion of our code is -still- in Fortran -- but at least it's F90+ :). --089e01228514d18ca404de377dd4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

<= /div>


On Sun, = Jun 2, 2013 at 11:10 PM, Dan Sommers <dan@tombstonezero.net> wrote:
On Sun, 02 Jun 2013 20:16:21 -0400, Jason Sw= ails wrote:

> ... If you don't believe me, you've never hit a bug that '= magically'
> disappears when you add a debugging print statement = ;-).

Ah, yes. =A0The Heisenbug. =A0;-)

Indeed. =A0Being in the= field of computational chemistry/physics, I was almost happy to have found= one just to say I was hunting a Heisenbug. =A0It seems to be a term geared= more toward the physics-oriented programming crowd.

We used to run into those back in the days of C and assembly langua
ge.<= br>
They're much harder to see in the wild with Python.
=A0
Yea, I've only run into Heis= enbugs with Fortran or C/C++. =A0Every time I've seen one it's been= due to an uninitialized variable somewhere -- something valgrind is quite = good at pinpointing. =A0(And yes, a good portion of our code is -still- in = Fortran -- but at least it's F90+ :).
--089e01228514d18ca404de377dd4--