While searched for creating dynamic functions in python, i end up with following code.
dynf = types.FunctionType(compile('print "really WoW"', 'dyn.py', 'exec'), {})
dynf()
As python guidelines, it suggested that use of eval and exec are not recommended for good programming. Hence is above code is efficient or is it have any problem on the performance of the program?