> Could you also use
>
> elif callable(locals().get(request.args(0)))
>
Don't use callable(), as this is being deprecated
>
> Or maybe:
>
> try:
> return locals().get(request.args(0), locals)()
> except TypeError:
> return locals().get(request.args(0), locals)
>
Thanks, I am going to use this:
###################################################################################################
if request.args(0) in locals():
return locals().get(request.args(0))() if
hasattr(locals().get(request.args(0)), '__call__') else
locals().get(request.args(0))
else:
return locals()
###################################################################################################
Now I want to know if in the future my app will not break, because returning
inner objects is a security issue.