On Wed, Jul 29, 2009 at 3:10 PM, Omer Khalid<omer.kha...@cern.ch> wrote:
> Hi Dave,
>
> Thanks for your reply. I actually didn't cut and paste my code as it was
> dispersed in different places, i typed the logic behind my code in the email
> (and obiviously made some typos, indentations is some thing else) but my

Please, do not do  that.  It's very difficult to debug code that
hasn't been seen.  The code you posted has numerous problems (that
likely have nothing to do with your actual problem.)

If you're going to post code, try to recreate the issue with a small
runnable script.  If you can't do that, as it sounds like it would be
difficult in this case as your code is dispersed in different places,
at least post the relevant portions of the actual code.  Don't
re-type.

> real code does not have these problems as my application runs fine with out
> errors...
>
> Except that the line where i want to update the value doesn't get updated
> and no exception is thrown. What's surprising for me is that i am doing the
> same thing in hundreds of places in my 3k+ line code but by some reason this
> part doesn't work...
>
> As far as the global variables are concerned, i am using them in other
> places too and didn't see any problems.
>
> I think some thing else is going on here as the statement above and below my
> modified lines get executed.

If the statements above and below that line(s) are executed, then that
line is certainly being executed as well.

Try introducing some additional print statements to verify your mental
model of what's happening:

    # set it to 1
    print jobs
    print jobs[index]
    print jobs[index]['v']
    jobs[index]['v'] = 1
    print jobs
    print jobs[index]
    print jobs[index]['v']
    print "Set to 1"

> Is there a way in Python to debug memory address or to see where in memory
> this object is stored, and is there a lock on it or else?

You are barking up the wrong tree.  Somewhere in your code you're
doing something silly that's causing your issue.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to