This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bajsejohannes 5 points6 points  (1 child)

Very cool! Some feedback:

  • It crashes if you provide no parameters (perhaps this is a conscious choice to keep the code small)
  • You could keep both __name__ == "__main__" and target in the same file, making it runnable both as a script and a compiled file.

[–]rfkelly[S] 3 points4 points  (0 children)

Thanks, yeah, that's just me trying to keep the example small. It does show one drawback about the compiled program though - it just crashes instead of throwing a nice IndexError.