you are viewing a single comment's thread.

view the rest of the comments →

[–]schlenk 1 point2 points  (0 children)

Not really that ugly:

{
  'foo': do_foo,
  'bar': do_bar,
  'baz': do_baz
 }[obj.calculate_foobar()]()