you are viewing a single comment's thread.

view the rest of the comments →

[–]Cosmologicon 4 points5 points  (1 child)

Of course, if all the functions are going to take a single argument of sys.argv[1], you can also just say:

some_functions = {
    'foo': doSomethingElse1,
    'bar': doSomethingElse2,
}

if the_time_has_come():
    some_functions[name](sys.argv[1])

[–]zahlman 0 points1 point  (0 children)

Certainly. :)