Variable op shortcut access?

If I want to access an op via a variable and via its op shortcut, is there a better way than:

name = “LEFT”
getattr(op, name)

Nope that’s currently the way. If you wanted to make it look nicer and the ops are static, I guess you could preload a nice dictionary or something.

opDict = {‘LEFT’: op.LEFT}