Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57818 > unrolled thread

Re: Debugging decorator

Started byChris Angelico <rosuav@gmail.com>
First post2013-10-29 00:00 +1100
Last post2013-10-29 00:00 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Debugging decorator Chris Angelico <rosuav@gmail.com> - 2013-10-29 00:00 +1100

#57818 — Re: Debugging decorator

FromChris Angelico <rosuav@gmail.com>
Date2013-10-29 00:00 +1100
SubjectRe: Debugging decorator
Message-ID<mailman.1698.1382965265.18130.python-list@python.org>
On Mon, Oct 28, 2013 at 11:43 PM, Schneider <js@globe.de> wrote:
> 2. In the case of an assignment (but holds for the return statement too).
> think about the following code:
>
> a = 0
> @debugging
> def foo():
>     a = a +  1
>
> def bar():
>     #assign something else to a
>
> Imagine foo() and bar() being called in two different threads.

I think threading considerations are rather outside the scope of this
tool. If you're trying to figure out what happens when two threads
mutate the same global, you really want something a lot more
heavy-duty... possibly static code analysis to work out what *might*
happen, rather than what *did* happen this particular run.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web