Sign In
Forgot Password?
Sign In | | Create Account

Embedded Software Blog

Posts tagged with 'Python'

24 Jun, 2010

Hollis Blanchard When I learned Python I became enamored with the idiom of dispatching, which looks something like this: name = "foo" function = getattr(object, "prefix_" + name) function() In this way we can call object.prefix_foo() without big switch statements or if/else if/else if constructs. Of course, I usually program in C. While we can’t do exactly the same thing there, the closest analogy is the function … Read More

powerpc, Python

Tags

Archives

 
Online Chat