1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Rep Power

    In case of disaster

    From a technical point of view, which means from the viewpoint of a properly partitioned Linux system and the hardware it runs on, what would happen if you did this:

    >>>a = 1; while a > 0; a += 1

    Assume, for argument's sake, that you never hit ctrl-c or otherwise took steps to interrupt execution of that line of interactive code.
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    This will run forever. Python2 uses, (as I recall) machine representation until it overflows, then continues with extended precision. Python3 makes no distinction, but otherwise you cannot tell the difference. Answered in an inebriated state.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo