best proceed enterprising classes controlling python globals()
i'm operative web concentration relapse non-static set modules depending user input. any way python category constructor accepts unparalleled parameter an '.html' ability contains output.
pulling category boldly tellurian namespace works:
result = globals()[classname](param).html
and it's definitely some-more laconic than:
if classname == 'foo':
outcome = foo(param).html
elif classname == 'bar':
...
what deliberate best proceed this, stylistically? there risks reasons tellurian namespace?
Comments
Post a Comment