Python Heisenbugs? (was: Re: PyWart: The problem with "print")

Chris Angelico rosuav at gmail.com
Mon Jun 3 01:05:53 EDT 2013


On Mon, Jun 3, 2013 at 2:34 PM, Dan Sommers <dan at tombstonezero.net> wrote:
> On Mon, 03 Jun 2013 13:37:27 +1000, Tim Delaney wrote:
>
>> With the increase in use of higher-level languages, these days
>> Heisenbugs most often appear with multithreaded code that doesn't
>> properly protect critical sections, but as you say, with lower-level
>> languages uninitialised memory is a common source of them.
>
> Aside from an I/O caching bug directly affected by calling print or
> somefile.write (where somefile is stdout), how else could I create a
> Heisenbug in pure Python?

If you have a @property, merely retrieving it could affect things. It
shouldn't happen, but bugs can be anywhere. Basically, ANY Python code
can trigger ANY Python code.

ChrisA



More information about the Python-list mailing list