I have a sample code looking like this, values (position = 2, object.position = 3) :
    new_position = position
    old_position = object.position    
    logging.debug("1. new_position: %s, old_position: %s" % (new_position, old_position))
    if old_position != new_position:
        logging.debug("old position other than new position")
        if new_position > old_position:
            logging.debug("Why am I here ?")
and now the debug:
DEBUG 1. new_position: 2, old_position: 3
DEBUG 2. old position other than new position
DEBUG Why am I here?
What's going on ?