14

The great thing about Python is that this actually runs

Comments
  • 3
    I don't get it, why shouldn't it run?
  • 3
    @odietamo Because of the '...' (it's literally in the code).
  • 2
    @LevitatingLion hahahahah didn't know that
  • 2
    Well python is interpreted, is it not?

    I guess it does not parse parts that are unreachable.

    Have seen the same in other languages. Lines are parsed on a need to basis and this script never reaches the dots.
  • 0
    @Voxera It reaches the dots every iteration of the while-loop, but the three dots are a valid Python expression (the Ellipsis object) and thus no error is raised.
    As far as I know, Python gets "compiled" into some sort of byte code before execution (like Java); It's not interpreted as-is like it's the case with Perl.
  • 1
    @LevitatingLion ok :)

    I did not know about that, never really used python except for some experimentation.
Add Comment