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

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members